Vidyalelo
JavaScript · Q22

Classes And Modules

Programming · JavaScript · question 22

Q22

To define each of the set classes as a property of the sets object (namespace) for the module, the statement is

A.
sets = sets.AbstractEnumerableSet.extend();
B.
sets.SingletonSet = sets.AbstractEnumerableSet.extend(...);
Answer
C.
sets.SingletonSet = sets.extend(...);
D.
sets = sets.extend(...);

Answer: Option B

Solution

Answer: Option B
Solution:
The sets object is the namespace for the module, and we define each of the set classes as a property of this object.