11. The function definitions in JavaScript begins with
12. 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 ?
function printprops(o)
{
for(var p in o)
console.log(p + ": " + o[p] + "n");
}
13. When does the function name become optional in JavaScript?
14. What is the purpose of a return statement in a function?
15. What will happen if a return statement does not have an associated expression?
16. A function with no return value is called
17. Consider the following code snippet
function hypotenuse(a, b)
{
function square(x)
{
return x*x;
}
return Math.sqrt(square(a) + square(b));
}
What does the above code result?
function hypotenuse(a, b)
{
function square(x)
{
return x*x;
}
return Math.sqrt(square(a) + square(b));
}
18. 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?
19. Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?
20. Consider the following code snippet :
var grand_Total=eval("10*10+5");
The output for the above statement would be :
var grand_Total=eval("10*10+5");