+ 2

it is working but i want expert way in which omit num<100e100 || num>100e-100 i used this in case of user give alphabetic input

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

9th Nov 2018, 12:40 PM
Sheraz Tariq
Sheraz Tariq - avatar
6 Respuestas
+ 4
Use !isNaN(num) as Number("y") returns NaN.
9th Nov 2018, 2:39 PM
John Wells
John Wells - avatar
+ 4
After finishing the courses here, move on to this site to extend your knowledge. https://www.w3schools.com/
9th Nov 2018, 5:05 PM
John Wells
John Wells - avatar
+ 3
if (num!=0 && num<100e100 || num>100e-100 ) becomes if (num!=0 && !isNaN(num) )
9th Nov 2018, 4:54 PM
John Wells
John Wells - avatar
+ 2
thanks it works where i learn all about js
9th Nov 2018, 5:02 PM
Sheraz Tariq
Sheraz Tariq - avatar
+ 2
thanks
9th Nov 2018, 5:16 PM
Sheraz Tariq
Sheraz Tariq - avatar
+ 1
i can't understand can you write here some line of code which should i change
9th Nov 2018, 4:52 PM
Sheraz Tariq
Sheraz Tariq - avatar