This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Mohammed Zakariya
over 8 years

Please help me. I don't know what's the problem.

function testIsnan(x){ if(isNaN(x)){ return “this is a text”; } else if (!isNaN(x)){ return “this is a number”; } else{ return “Please try again”; }

} ;
testIsnan(‘moh’);

This is my code. it’s working but there is an error message appearing to me “Oops, try again. Make sure your if/else if/else statement returns a string when the function input isn’t a number.”

I don’t know what’s the problem. Please I need your help and tell me what should I do.

Answer 5613d74b3e0ec8d88a00037b

0 votes

Permalink

Can you tell me it’s in which exercise? Because I see no mistake in your code..

points
Submitted by mugiz
over 8 years