Basic User class
Open the developer console to see the result
{"name":"John","surname":"Doe","age":25,"isAdult":true} {"name":"Jane","surname":"Doe","age":17,"isAdult":false}
class e{constructor(e,t,n=25){this.name=e,this.surname=t,this.age=n,this.isAdult=this.age>18}greet(){return`Hi, ${this.name} ${this.surname}`}}const t=new e("John","Doe"),n=new e("Jane","Doe",17);console.log(t.greet(),t),console.log(n.greet(),n),document.querySelector("pre").textContent=`\n${JSON.stringify(t)}\n${JSON.stringify(n)}\n`;
//# sourceMappingURL=user.js.map