26th Jan 2018, 5:00 PM
Crixus
Crixus - avatar
2 Answers
+ 2
Your problem is that it is thinking that both numbers are strings so that’s why it combines them into 2 numbers ex, 8+2 = 82. You need to convert them into a number so they will add together, ex: 8+2 = 10.
26th Jan 2018, 5:43 PM
Ole113
Ole113 - avatar
+ 1
thanks a lot, I fixed it using parseInt.
26th Jan 2018, 5:50 PM
Crixus
Crixus - avatar