23 ms·
> handling integer math correctly JavaScript doesn't have integers. Everything is a float. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Gl
by throwaway632 3y ago
> handling integer math correctly
JavaScript doesn't have integers. Everything is a float.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Although it has BigInt now.
- alyandon 3y agoYes, I'm aware that internally it is using floating point representation and that is one of the main reasons I avoid using it for anything math related. However, I am now aware that BigInt() exists so thanks for the link.