JSFiddle - React, Tailwind, and code Playground
JavaScript
function First(name){
this.name=name;
}
First.prototype.hair='black';// tom.hair gets me undefined
function Second(){
this.age=1;
}
First.prototype.age=new Second().age;
var tom=new First('tom');
tom.nail='sharp';// added property to tom
for(var i in tom){
console.log(i);
}
console.log(tom.age);