May 2011
Intermediate to advanced
1096 pages
40h 54m
English
Object.getPrototypeOf() — return the prototype of an object
ECMAScript 5
Object.getPrototypeOf(o)
oAn object.
The prototype object of o.
Object.getPrototypeOf()
returns the prototype of its argument. Note that this is a global
function, and you must pass an object to it. It is not a method that
is invoked on an object.
varp={};// An ordinary objectObject.getPrototypeOf(p)// => Object.prototypevaro=Object.create(p)// An object that inherits from pObject.getPrototypeOf(o)// => p
Read now
Unlock full access