Using the new keyword invokes a _______ that creates a new object.

  • constructor
  • function
  • class
  • prototype
Using the new keyword in JavaScript invokes a constructor function that creates a new object. This object is then initialized with properties and methods defined within the constructor function. The constructor function serves as a blueprint for creating objects.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *