A

Admin • 833K Points
Coach

Q. What kind of an expression is “new Point(2,3)”?

  • (A) Invocation Expression
  • (B) Constructor Calling Expression
  • (C) Primary Expression
  • (D) Object Creation Expression
  • Correct Answer - Option(D)
  • Views: 25
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

The expression new Point(2, 3) is an example of an object creation expression. It uses the new keyword to create an instance of the Point class (or constructor function), initializing it with the arguments 2 and 3. This is typically used to instantiate new objects in object-oriented programming.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.