- A Public object, Private object, Protected object
- B Constructor object, Function object, Destructor object
- C Constructor object, Prototype object, Instance object
- D Instance method, Static object, Dynamic object
- Share this MCQ
Answer:
C
Share this MCQ
In JavaScript, there are three different objects involved in the definition of a class: the constructor object, the prototype object, and the instance object. These objects have properties that act like different kinds of class members.
The constructor object is the function that is used to create an instance of the class. It has properties that act like instance fields and instance methods.
The prototype object is an object that is shared by all instances of the class and has properties that act like class fields and class methods.
The instance object is an object that represents a single instance of the class and has properties that act like instance fields and instance methods.
Share this MCQ