- 1
NaN error
how to solve NaN error in javascript
3 Answers
+ 2
NaN means not a number. If you're attempting to do something with a variable that requires it to be of number type and it isn't. This may be your issue.
Post your code so we can help.
+ 1
Try to use parseInt() or parseFloat() rather than implicit coercion or explicit Number() cast...
But as stated by others, you should provide your code to get relevant answers, as without enough context, nobody could help you more than guessing how would it be "solved" ^^
(another way would be to delete the line pointed by the error message: no more NaN error at this location will occur... but your code will not behave as expected, and/or a new error should appears near or far away of this initial error :P)
0
Show me ur code