+ 1

Please why is this code printing +++ when i input the supposed value kike 1,2,3,4 or 5 from input field.

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

1st Oct 2022, 3:02 PM
Cindy K Hink
Cindy K Hink - avatar
3 ответов
+ 2
Cindy K Hink Convert input to number. When you take input it is considered as string by default. var x = Number(n1.value);
1st Oct 2022, 5:42 PM
A͢J
A͢J - avatar
+ 1
It's working
2nd Oct 2022, 9:54 AM
Daniel Nwachukwu Chigozirim
Daniel Nwachukwu Chigozirim - avatar
+ 1
Yeeah i just edited it
2nd Oct 2022, 1:49 PM
Cindy K Hink
Cindy K Hink - avatar