【发布时间】:2020-11-01 06:13:24
【问题描述】:
如下所示,在所有情况下,数字都显示错误:
var a = 714205074837649919;
console.log(a); //>> 7.1420507483764992E17
console.log(parseInt(a)); //>> 7.1420507483764992E17
console.log(parseInt(a).toString()); //>> 714205074837649900
console.log(parseFloat(a).toString()); //>> 714205074837649900
【问题讨论】:
-
什么问题?
-
欢迎来到 StackOverFlow,请借此机会参加 tour 并学习如何使用 How to Ask、format code、minimal reproducible example 和 Tag Info
标签: javascript google-apps-script bigint int64