0

Object.create() builds an object that inherits directly from the one passed as its first argument and with constructor functions, the newly created object inherits from the constructor's prototype

Is this correct and is there any other difference?

  • 1
    Yes, it's correct. Additionally to object creation, you can set some internal slots for the properties with `Object.create` at once, namely `value` or `get`/`set`, `writable`, `enumerable` and `configurable`. There's also differences with the result of `instanceof` operator, an object derived from another object is not an instance of its prototype like a constructed object is an instance of its constructor. – Teemu Jan 03 '22 at 10:15

0 Answers0