+ 3

How can I write my "if" in corrext way??

https://code.sololearn.com/Wbfeb3zjKXk2/?ref=app

6th Jun 2018, 3:03 PM
Sina
Sina - avatar
2 Respostas
+ 3
Use isNaN() to determine whether a value is NaN. 
6th Jun 2018, 3:08 PM
Calviղ
Calviղ - avatar
+ 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") }
6th Jun 2018, 3:12 PM
Fata1 Err0r
Fata1 Err0r - avatar