Standard built-ins

Object.getPrototypeOf()

Try the free JavaScript compiler

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

NameTypeDescription
objAnyValue to convert to an object; nullish values throw.

Return Value

Object | null

Prototype link.

Working Example

Example Snippetjavascript
console.log(Object.getPrototypeOf({})===Object.prototype);
JavaScript Reference