Favorites

JavaScript Object.create() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Object.create()
JavaScript Object Static methodThis method is supported by all modern browsers.
Updated 28th November 2026

The Object.create() static method creates a new object with a chosen prototype, which is useful for inheritance and for creating objects with no prototype at all.

Description

The Object.create() static method creates a new object that inherits from the object you pass as its prototype. Properties not found on the new object are looked up on the prototype.

Object.create(null) creates an object with no prototype at all, so it has no inherited properties like toString; this used to be a common way to make a safe dictionary, although a Map is now usually better. For inheritance in everyday code, class syntax is clearer.

The second argument takes property descriptors, the same format as Object.defineProperties(), so properties created this way are non-writable, non-enumerable and non-configurable unless you say otherwise. Passing something other than an object or null as the prototype throws a TypeError.

Syntax

Object.create(proto)
Object.create(proto, propertiesObject)

Parameters

  • protoThe object to use as the new object's prototype, or null.
  • propertiesObjectOptional. Property descriptors to define on the new object.

Return Value

A new object with the given prototype.

Example

const animal = { speak() { return this.name + ' makes a sound'; } };
const dog = Object.create(animal);
dog.name = 'Rex';
console.log(dog.speak());
console.log(Object.getPrototypeOf(dog) === animal);

const dict = Object.create(null);
console.log('toString' in dict);

Browser Support

The following information will show you the current browser support for the Object.create() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee