Which static method creates an object with a given prototype?
Answer
Object.create()
Answer
Object.create()
Object.create() creates an object with a specified prototype.
Its first argument becomes the new object’s internal prototype, so inherited properties and methods can be supplied without calling a constructor. For example, Object.create(personPrototype) creates an object that delegates property lookups to personPrototype.
The method was standardized in ECMAScript 5, published in 2009, and is especially associated with JavaScript’s prototype-based inheritance model. Its optional second argument can also define the new object’s own properties with full property-descriptor control.
A common mix-up is __proto__: assigning __proto__ can change an existing object’s prototype, whereas Object.create() creates a new object directly. Object.assign() is different: it copies enumerable own properties into a target and does not establish prototype inheritance.
Source: Wikipedia · fact-checked Aug. 2026