+ 1

Why when I delete "parseInt" the code doesn't work correctly??

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

28th Feb 2018, 9:08 PM
Sina
Sina - avatar
7 odpowiedzi
+ 4
Because the input element's value is a string, so instead of add the values, it concatenates them
28th Feb 2018, 9:13 PM
voidneo
+ 2
Ok underestood
28th Feb 2018, 9:17 PM
Sina
Sina - avatar
+ 2
Thank you
28th Feb 2018, 9:17 PM
Sina
Sina - avatar
+ 2
Excuse me can you make an example with parseInt??plz
28th Feb 2018, 9:17 PM
Sina
Sina - avatar
+ 2
thank's
28th Feb 2018, 9:24 PM
Sina
Sina - avatar
+ 1
Sure, give me one minute
28th Feb 2018, 9:23 PM
voidneo
28th Feb 2018, 9:36 PM
voidneo