Standard built-ins
Object.getPrototypeOf()
Returns the internal prototype of the object, or null for no prototype. Non-nullish primitives are boxed.
Formal Syntax & Structure
javascript syntaxjavascript
Object.getPrototypeOf(obj)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| obj | Any | Value to convert to an object; nullish values throw. |
Return Value
Object | null
Prototype link.
Working Example
Example Snippetjavascript
console.log(Object.getPrototypeOf({})===Object.prototype);