Is there a way to convert NaN values to 0 without an if statement? Example:

if (isNaN(a)) a = 0;

It is very annoying to check my variables every time.

11 Answers
11

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *