0
Help!!!!!
I always thought *Number* turns string into numbers to calculate Can someone tell me why it returns different? https://code.sololearn.com/WFHhFpU8FKz7/?ref=app
2 odpowiedzi
+ 3
The issue isn't with the Number function, but rather lines 4, 7, and 13. Because there are no functions in the code, lines 4 and 13 wouldn't work considering they can't return anything anymore (and the keyword is return rather than returns), and <!-- --> is not the comment for JS but rather for HTML which would likely confuse the program
+ 1
Faisal thank you for taking the time but I figured it out, the issue is with the Number function because it does not add as en equation but it concatenates the two strings inside, so it joins 1 and 6 and it becomes 16 + 10 = 26.
Anyways thank you very much and I appreciate the other tips you gave me. #blessings