Question · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

Object.create()

What does the Object.create(proto) method do?

Answer options

  • Copies all properties from proto to a new object
  • Freezes the proto object
  • Creates a new object with proto as its prototype
  • Creates a new object and deletes proto
Show the answer

Correct answer:

  • Creates a new object with proto as its prototype