- use the
0bprefix for binary, and the0oprefix for octal integer literals Number.isNaNandNumber.isFiniteare like their global namesakes, except that they don’t coerce the argument to NumberNumber.parseIntandNumber.parseFloatare exactly the same as their global namesakes- use
Number.isIntegerto check if the argument is a Number value that doesn’t have a decimal part - use
Number.EPSILONto check if the difference between two Number values is negligible (e.g. the difference between0.1 + 0.2and0.3is negligible) Number.MAX_SAFE_INTEGERandNumber.MIN_SAFE_INTEGERare the largest and smallest integers that can be safely and precisely represented in JavaScript- use
Number.isSafeIntegerto check if an integer is within those bounds
Read the full blog post here.