Given:
var result;
function getH(num1, num2, num3) {
if (isNaN(num1) || isNaN(num2) || isNaN(num3)) {
alert("getH: error in parameters");
return false;
}
else {
result=(num1 num2 num3)/3;
return true;
}
}
What will be the output, if you make the following function call:
getH(3,4,5);
a) error occurs
b) an alert box display getH: error in parameters
c) 4
d) no output
The answer is d.. why? the 3,4 and 5 are indeed numbers.. so answer should be c...
Tags: