Consider the following code snippet
o.m(x,y);
Which is an equivalent code for the above code snippet?
o.m(x) && o.m(y);
o["m"](x,y);
o(m)["x","y"];
o.m(x && y);
Answer : B
View More Related Question
1) Consider the following code snippet :
var c = counter(), d = counter();
c.count()
d.count()
c.reset()
c.count()
d.count()
The state stored in d is :
2) Consider the following code snippet
o.m(x,y);
Which is an equivalent code for the above code snippet?
3) What is the purpose of a return statement in a function?
Returns the value and continues executing rest of the statements, if any
Returns the value and stops the program
Returns the value and stops executing the function
Stops executing the function and returns the value
View Answer
4) Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?
5) Consider the following code snippet
function printprops(o)
{
for(var p in o)
console.log(p + ": " + o[p] + "\n");
}
What will the above code snippet result ?
Prints the contents of each property of o
Returns undefined
All of the mentioned
None of the mentioned
View Answer