Tuesday, August 19, 2014

Previous Interview Question Next Interview Question
Home

which of the following indicates what is wrong with the function below?

function counter(x)
{
if(isNaN(x))
{
return false;
}
Y+=x;
alert(y);
return true;
}

a)      Unless it is a global variable, y is not declared and has no initial value
b)      Unless it is a global variable, x is not declared and has no initial value
c)       Unless it is a global variable, isNan() is not declared and has no initial value
d)      Unless it is a global variable, true is not declared and has no initial value


Answer :  A

Previous Interview Question Next Interview Question
Home

0 comments :

Post a Comment