You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At or above 1e21, JS represents numbers with scientific notation:
> 1e20
100000000000000000000
> 1e21
1e+21
If you need to keep precision for integers above MAX_SAFE_INTEGER, you should use BigInt if you can. Unfortunately, BigInt doesn't serialize to JSON:
> obj = {"id":1234567890123456789012n,"name":"edwin"}
{ id: 1234567890123456789012n, name: 'edwin' }
> JSON.stringify(obj)
Thrown:
TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
why?
1234567890123456789012 -> 1.2345678901234568e+21
var VERSION = '9.0.6';
The text was updated successfully, but these errors were encountered: