FrontendInterviews.dev

679. Object.create(null) Prototype Behavior

Easy•

Predict the output.

const obj = Object.create(null)
obj.x = 1
console.log('toString' in obj, Object.hasOwn(obj, 'x'))

What is printed in the console?

Select an option and submit your answer.
Next Problem