how to make 0 is nan in javascript code example Example: javascript change nan to 0 a = a || 0 //if "a" is false (NaN included), will return 0