JSFiddle - React, Tailwind, and code Playground
JavaScript
// has a relationship
function Address(){
this.street = "10 th Street";
this.city = " Gurgoan";
this.country = "India";
}
function Employee(name) {
this.name = name;
this.address = new Address()
}
var e1 = new Employee("ram");
console.log(e1.address);