+ 3
How can I write my "if" in corrext way??
2 Réponses
+ 3
Use isNaN() to determine whether a value is NaN.
+ 2
Technically, nothing wrong with your IF statements, works fine for me. However, as advised by the editor (and by Calvin), you'll want to use isNaN() function to assess if it's NaN.
EXAMPLE:
if(isNaN(a) || isNaN(b) || isNaN(c)){
alert("plz enter a number not a string")
}