What will happen if a return statement does not have an associated expression?
Home | Discussion ForumWhat will happen if a return statement does not have an associated expression?
It returns the value 0
It returns the value 0
It returns the undefined value
None of the mentioned
Answer : C
View More Related Question
1) Consider the following code snippet :
var string2Num=parseInt("123xyz");
The result for the above code snippet would be :
2) The function definitions in JavaScript begins with
Identifier and Parantheses
Return type and Identifier
Return type, Function keyword, Identifier and Parantheses
Identifier and Return type
View Answer
3) 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
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
o.m(x,y);
Which is an equivalent code for the above code snippet?