94. implement your own `Object.create`
Share
easy - accepted / - tried
You can use Object.create() to create a new object.
Can you write your own myObjectCreate()
to do the same(well for the basic usage) ?
Note
- you don't need to support
propertiesObject
- 2nd parameter of Object.create - throw an Error if non-object is passed in. (why?)
Object.create()
andObject.setPrototypeOf()
should not be used.
Related Lists
the good and bad bits of JavaScript