JavaScript Reflect.getPrototypeOf() MethodThe static Reflect.getPrototypeOf() method is used to return the prototype of the specified object. It is same as the method Object.getProtptypeOf( ). Syntax:Parameters:Obj: It is the target object of which to get the prototype. Return value:This method returns the prototype of the given object. Exceptions:A TypeError, if you give it an invalid target such as a Number or String literal, null or undefined. Browser Support:
Example 1Output: true Example 2Output: [object Object] { ... } Example 3Output: null
Next TopicJavaScript Reflect
|