4 ms·
It can do integers.
by AlchemistCamp 6y ago
It can do integers.
- hajile 6y agoBigInt landed in ES2020 and has been supported in something like the last 10-20 versions of Chrome and Firefox, so no huge worries about using it (the "current" browser without support is IE11). The `123|0` type hint is also recognized and implemented by most browsers too. It forces a 31-bit integer on most platforms (and can offer a significant performance boosts if you're running a tight algorithm). https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...