JavaScript: Object.prototype

By Xah Lee. Date: . Last updated: .

Object.prototype is the value of the property key "prototype" of the function Object.

[see Object Object]

console.log( Object.hasOwnProperty ( "prototype" ) ); // true

Type

Type of Object.prototype is Object .

console.log( typeof Object.prototype === "object" ); // true

Parent

Parent of Object.prototype is null.

console.log( Reflect.getPrototypeOf ( Object.prototype ) === null ); // true

[see Prototype and Inheritance]

Purpose

Object.prototype is the root parent of all standard objects.

So, for any property key k of Object.prototype, you can access it by obj.k where obj is any object. If the object obj has k as its own property, the own property is used.

Properties

Function Properties

Data Property

Getter/Setter Property

JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Object Object

prototype