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));
}
A. Sum of square of a and b
B. Square of sum of a and b
C. Sum of a and b square
D. None of the mentioned
Answer: Option A

Join The Discussion