Consider the following code snippet :
var tensquared = (function(x)
Home | Discussion Forum
Consider the following code snippet :
var tensquared = (function(x)
{
return x*x;
}
(10));
Will the above code work ?
Yes, perfectly
Error
Exception will be thrown
Memory leak
Answer : A
View More Related Question
1) Which of the following is the correct code for invoking a function without this keyword at all, and also too determine whether the strict mode is in effect?
var strict = (function { return this; });
mode strict = (function() { return !this; }());
var strict = (function() { return !this; }());
mode strict = (function { });
View Answer
2) A function with no return value is called
3) Consider the following code snippet
o.m(x,y);
Which is an equivalent code for the above code snippet?
4) When does the function name become optional in JavaScript?
When the function is defined as a looping statement
When the function is defined as expressions
When the function is predefined
All of the mentioned
View Answer
5) Consider the following code snippet
function f() {};
The above prototype represents a