JSFiddle - React, Tailwind, and code Playground

by Andrey Zakharov

JavaScript

var StudentConstructor = function (fullName,age, gender){
this. fullName ={};
this. fullName.firstName = fullName.fn;
this.fullName.lastName = fullName.ln;
this.age = age;
this.gender = gender;
return this;
};
var st1 = new StudentConstructor({fn: "Arny", ln: "Black"},40, 'male');
var st2 = new StudentConstructor({fn: "Roby", ln: "White"},32, 'male');
console.log(st1,st2);