Because that’s how floating-point is defined (more generally than just Javascript). See for example:

- http://en.wikipedia.org/wiki/Floating-point#Infinities
- http://en.wikipedia.org/wiki/NaN#Creation

Crudely speaking, you could think of 1/0 as the limit of 1/x as x tends to zero (from the right). And 0/0 has no reasonable interpretation at all, hence NaN.

### Related Contents:

- Adding to Number.MAX_VALUE
- Read/Write bytes of float in JS
- Why is math.max() returning NaN on an array of integers?
- Float sum with javascript [duplicate]
- Why does adding two decimals in Javascript produce a wrong result? [duplicate]
- How to deal with floating point number precision in JavaScript?
- What is JavaScript’s highest integer value that a number can go to without losing precision?
- How to force JS to do math instead of putting two strings together [duplicate]
- How do you check that a number is NaN in JavaScript?
- Why does typeof NaN return ‘number’?
- JavaScript % (modulo) gives a negative result for negative numbers
- How to deal with big numbers in javascript [duplicate]
- Javascript (+) sign concatenates instead of giving sum of variables
- Dealing with float precision in Javascript [duplicate]
- JavaScript math, round to two decimal places [duplicate]
- Javascript: formatting a rounded number to N decimals
- What does the ^ (caret) symbol do in JavaScript?
- How to perform an integer division, and separately get the remainder, in JavaScript?
- How does JavaScript determine the number of digits to produce when formatting floating-point values?
- What is the fastest factorial function in JavaScript? [closed]
- Why does isNaN(” “) (string with spaces) equal false?
- Safe evaluation of arithmetic expressions in Javascript
- Remove insignificant trailing zeros from a number?
- JavaScript exponents
- BigDecimal in JavaScript
- JavaScript Number Split into individual digits
- Calculate date from week number in JavaScript
- Is there a way to calculate 3D rotation on X and Y axis from a 4×4 matrix
- JavaScript displaying a float to 2 decimal places
- How to convert string into float in JavaScript?
- regular expression for finding decimal/float numbers?
- How to use nan and inf in C?
- How do I round a number in JavaScript?
- Mixing two colors “naturally” in javascript
- How can I specify the base for Math.log() in JavaScript?
- Rounding numbers to 2 digits after comma
- Avoiding problems with JavaScript’s weird decimal calculations
- Convert 2:1 equirectangular panorama to cube map
- Does JavaScript have double floating point number precision?
- How can I convert numbers into scientific notation?
- Calculating the shortest route between two points
- Javascript Math Error: Inexact Floats [duplicate]
- understanding floating point variables
- How can I round down a number in Javascript?
- How can I get sin, cos, and tan to use degrees instead of radians?
- Why JavaScript says that a number is not a number? [duplicate]
- Write a truly inclusive random method for javascript
- How to simplify a decimal into the smallest possible fraction?
- Sum numbers returns NaN
- Show a leading zero if a number is less than 10 [duplicate]