1.

Modules that have more than one item in their API can ________(a) Assign itself to a global variable(b) Invoke another module of the same kind(c) Return a namespace object(d) Invoke another module of the same kindThis question was addressed to me by my college director while I was bunking the class.Origin of the question is Modules in JavaScript in division Classes and Modules in JavaScript of JavaScript

Answer»

The correct answer is (c) RETURN a namespace object

The explanation is: Namespace is a container for a set of identifiers, FUNCTIONS, methods and all that. It GIVES a level of DIRECTION to its contents so that it will be well distinguished and organized. Modules that have more than one item in their API can return a namespace object.



Discussion

No Comment Found

Related InterviewSolutions