JavaScript Object create() Method
Last Updated : 17 Mar 2025
The Object.create() method is used to create a new object with the specified prototype object and properties. We can create an object without a prototype by Object.creates (null).
Syntax:
Parameter
prototype: It is the prototype object from which a new object has to be created.
propertiesObject: It is an optional parameter. It specifies the enumerable properties to be added to the newly created object.
Return
Object.create() returns a new object with the specified prototype object and properties.
Browser Support:
| Chrome | Yes |
| Edge | Yes |
| Firefox | Yes |
| Opera | Yes |
Example 1
Output:
"My name Marry. Am I human? true"
Example 2
Output:
Example 3
Output:
"fruit" "Winter" "Winter"