I have problem.
I am writing online JavaScript test, and there is a task to write a function which checks if the value of the parameter is a number. If so, then function must return true.
So I wrote it:
function Numeric(a) {
if(isNaN(a)===false)
return true;
else
throw "Element is not a number";
}
It works fine is JSfiddle, but I don't know why, at that site it is not working. Doesn't pass the test. Any ideas?