Object.getPrototypeOf() method returns the prototype (value of the internal [[Prototype]] property) of the specified object.
syntax ↴
Object.getPrototypeOf(obj) ↴
obj The object whose prototype is to be returned.
Object.getPrototypeOf() method returns null if there are no inherited properties.
By default, objects inherit from Object.prototype.
prototype of Object.prototype is an empty object {} which is also the ultimate prototype for all objects in JavaScript.
Object.getPrototypeOf(myObject) is the same as myObject.__proto__
__proto__ can be pronounced as dunder proto.
Although __proto__ is supported on major browsers, it's always recommended to avoid using non-standard features as much as possible, even if there is practically no difference between the standard and the non-standard features, as is the case with __proto__ and Object.getPrototypeOf().
Object.getPrototypeOf(myObject)