What does object.create do?



What does object.create do?..

Answer / Saurabh Pratap Singh

[n {n "description": "object.create() is a JavaScript method that creates a new object and makes the newly created object a prototype of an existing object.n ",n "example": "n let proto = {"a": 1};n let obj = Object.create(proto);n console.log(obj.a); // Outputs: 1"n },n {n "description": "object.create() can also accept a second argument, propertiesObject, to set initial values for the new object.n ",n "example": "n let proto = {"a": 1};n let obj = Object.create(proto, {"b": {"value": 2, "writable": true}});n console.log(obj.b); // Outputs: 2"n }n]

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JSON Interview Questions

List some benefits of json over xml?

1 Answers  


Is json is a language?

1 Answers  


Name some of the most widely used libraries in .net for json?

1 Answers  


What is json-rpc? What is json-rpc-java?

1 Answers  


Is json a web service?

1 Answers  


What is number in json?

1 Answers  


What is serialization and deserialization in json?

1 Answers  


What is json parsing?

1 Answers  


What is json data. and what is one way that .net developers can work with json?

1 Answers  


What is jsonresponse?

1 Answers  


What is json array?

1 Answers  


Do jwt tokens expire?

1 Answers  


Categories