Object.createintermediate// Create an object with a specific prototype
const proto = { greet() { return 'hi' } }
const child = Object.create(proto)
child.greet() // β 'hi'Use Object.create() to create a new object with a specific prototype, enabling prototype-based inheritance.
Object.create(null) creates an object with no prototype at all β not even Object.prototype. This is useful for plain dictionaries that cannot be polluted by inherited properties.
Challenge: Implement createNullProto() that returns an object created with Object.create(null).
Object.getPrototypeOf(createNullProto()) // β null