Javascript class, initialize with object & optional values
I have a few questions regarding the code below: export class Person { constructor(obj = { id: 0, name: '', lastName: '', eyeColor: '', age: 0 }) { this.id = obj.id; this.name = obj.name; this.lastName = obj.lastName; this.eyeColor = obj.eyeColor;…