+ 3
How can I write my "if" in corrext way??
2 Answers
+ 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")
}