0

Why is total NaN?

I can't figure out why total shows up as NaN (not a number) in this code https://code.sololearn.com/WL69y4wzB7Zf/?ref=app

19th Feb 2018, 10:53 PM
jacksonofgames 28
jacksonofgames 28 - avatar
2 ответов
+ 8
You have to assign total variable to 0 in first line of your code. like this =》 var total = 0;
19th Feb 2018, 11:12 PM
UnknownYmous
+ 1
Oh so the variable is identified as numerical. That makes sense. Thanks!
19th Feb 2018, 11:46 PM
jacksonofgames 28
jacksonofgames 28 - avatar