in javascript number.nan code example Example 1: javascript nan NaN = Not a number. Example 2: nan in js var val = Number.NaN;