Mdn Docs __proto__ vs __proto__ Accessor

In mdn’s doc’s for the prototype chain, it states All objects inherit the Object.prototype.__proto__ setter, which can be used to set the [[Prototype]] of an existing object (if the __proto__ key is not overridden on the object). It then goes on to say that Object.prototype.__proto__ accessors are non-standard and deprecated. You should almost always use… Read More Mdn Docs __proto__ vs __proto__ Accessor

Can anyone help me to undrstnd the output of the below code

let obj1 ={ fName : ‘Ayush’, lName : ‘Singh’, city: ‘Asansol’, getName : function(){ console.log(`I am ${this.fName} ${this.lName} from ${this.city}`) } } let obj2 = { fName : ‘Aman’ } obj2.__proto__ = obj1; console.log(obj1.getName()) obj2.getName() console.log(obj2.__proto__.getName()) console.log(obj1.__proto__.getName()) Here I am trying to check how proto works. Why can’t I access of obj1.proto.getName >Solution : Deprecated:… Read More Can anyone help me to undrstnd the output of the below code