On this page
  1. Object.getPrototypeOf
  2. Signature & Overview
  3. Notes & Pitfalls
  4. Example

Object.getPrototypeOf

Prev: is | Up: Object | Next: defineProperty
Rel: Object, Object & Reflect Guide
Ref: MDN Web Docs — Object.getPrototypeOf
Tags: #public #web #javascript #builtins #object #tier/specialized


Signature & Overview

Object.getPrototypeOf(obj)

Returns the internal prototype of obj (or null for Object.prototype).

Notes & Pitfalls

Example

console.assert(Object.getPrototypeOf([]) === Array.prototype);
console.assert(Object.getPrototypeOf(Object.create(null)) === null);

Linked from

Related notes