Consider the following code snippet
function hypotenuse(a, b)
{
Home | Discussion Forum
{
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?
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?
View Answer
2) Consider the following code snippet :
var string2Num=parseInt("123xyz");
The result for the above code snippet would be :
3) 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 :
4) The function definitions in JavaScript begins with
View Answer
5) If you have a function f and an object o, you can define a method named m of o with