Single Choice
Easy
QWhat steps may be taken to prevent JavaScript from creating global variables?
ID: #5022
Javascript Modules MCQ
388 views
Question Info
#5022Q ID
EasyDifficulty
Javascript Modules MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
To prevent the creation of global variables, a module can use an object as a namespace.
This means that instead of defining global functions and variables, the module stores them as properties of an object, which may be linked to a global variable
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic