3 ms·
I love that 1/0 = infinity in JS. It's as pragmatic as a tired student doing their algebra homework at 1AM :))
by Demiurge 5y ago
I love that 1/0 = infinity in JS. It's as pragmatic as a tired student doing their algebra homework at 1AM :))
- an1sotropy 5y agoLike others have already noted; 1/0 == inf is something about JS, it is a consequence of JS defaulting to IEEE754 floating point representation for all numbers. Any language that supports IEEE754 FP will have the same result.