Beginner
JavaScript
Q36 / 100
What is the purpose of the new keyword?
Correct! Well done.
Incorrect.
The correct answer is B) Calls a constructor function, creates a new object, sets prototype, and returns the object
B
Correct Answer
Calls a constructor function, creates a new object, sets prototype, and returns the object
Explanation
new MyClass() creates an object, sets its __proto__ to MyClass.prototype, calls the constructor, and returns the new object.
Progress
36/100