const obj = {
name: "John",
getName: function() {
return this.name
}
}
console.log("Type", typeof(obj.getName()))
const obj2 = {
roll: 2,
desig: "Software developer",
name : "Peter",
_proto_: obj
}
console.log(obj2.getName())
__proto__
with two underscores on each side, not one.