0
I can't get the 2 inputs to add as floats and not as strings. Help plzz🙄
5 Respostas
+ 5
Because value attribute is a string.
You need to convert from string to number.
Edit:
https://www.sololearn.com/Discuss/2500838/?ref=app
+ 2
You can use Number(value) to convert a string to a number.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
c = Number(a) + Number(b)
+ 1
Yes but how tho
+ 1
Thanks man! I really appreciate it