Javascript parsing int64

前端 未结 5 1220
盖世英雄少女心
盖世英雄少女心 2020-12-03 17:19

How can I convert a long integer (as a string) to a numerical format in Javascript without javascript rounding it?

var ThisInt = \'9223372036854775808\'
aler         


        
5条回答
  •  遥遥无期
    2020-12-03 17:56

    You cannot do this with standard Javascript. But as always, there is a nifty little library to help us out, in this case BigInt.js, which will let you use arbitrary-precision integers.

提交回复
热议问题