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 |
what are the drawbacks of JSON?
Is jwt stateless?
What is json in javascript?
Explain Syntax of JSON?
What is json text?
What is the use of json.parse in javascript?
What is a json parser?
Why do we need json?
How to Parse JSON Data that is Coming from a Server in Android?
1 Answers SkillGun Technologies,
What are the limitations of jsonp?
Explain JSON Arrays?
What is the extension of json file?