4 ms·
Why does dividing by zero in JavaScript result in Infinity?
- lutusp 13y agoNot adequately covered in the linked conversation is the fact that division by zero is undefined in mathematics. The logic goes like this: if dividing A by zero to produce B is allowed, this implies that multiplying B times zero equals A. Not a rational implication, therefore it's undefined.