Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the efficiency quotient of the following JavaScript statements?
var Set = sets.Set;
var s = new Set(1,2,3);

What will be the efficiency quotient of the following JavaScript statements?
var Set = sets.Set;
var s = new Set(1,2,3);
a) The programmer imports at once the frequently used values into the global namespace
b) There is no efficiency quotient, the programmer tries to make it inefficient
c) The programmer needs to import the Sets everytime he wants to use it
d) the programmer imports the set everytime the statement is encountered

Answer: a
Explanation: A programmer can import frequently used values into the global namespace. A programmer who was going to make frequent use of the Set class from the sets namespace might import the class like that.

Join The Discussion