📊 JavaScript
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
💬 Discuss
✅ Correct Answer: (D) Object Creation Expression

Explanation:

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.

Explanation by: Praveen Singh

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.

💬 Discussion


📊 Question Analytics

👁️
292
Total Visits
📽️
4 y ago
Published
🎖️
Kirti
Publisher
📈
80%
Success Rate