最近玩了玩chrome,感觉快被我玩坏了
var a = 12345678901234567890
undefined
a
12345678901234567000//卧槽??为何最后几位被舍了
================分割线君=========================
console.log(a.length)
undefined//为何输出不了长度呢 看看类型好了
undefined
================分割线君=========================
a
12345678901234567000
console.log(typeof a)
number VM695:2 .//还是数字。。。没被转成字符串
undefined
================分割线君=========================
var a = -12345678901234567890//加上符号试试~
undefined
a
-12345678901234567000//看来正数也是有一个符号位的
================分割线君=========================
var a=0.1234567890123456789//来个小数玩玩
undefined
a
0.12345678901234568 //小数点后17位 最后一位四舍五入了貌似
================分割线君=========================
================下面这块我就被玩坏了=========================
var a=0.12345678901234563
undefined
a
0.12345678901234564
------------------------------------------------------
var a=0.12345678901234565
undefined
a
0.12345678901234565
------------------------------------------------------
var a=0.12345678901234566
undefined
a
0.12345678901234566
------------------------------------------------------
var a=0.12345678901234567 //卧槽 67你怎么自己华丽丽的变身了????
undefined
a
0.12345678901234566
------------------------------------------------------
var a=0.12345678901234568
undefined
a
0.12345678901234568
------------------------------------------------------
var a=0.12345678901234569
undefined
a
0.12345678901234569
------------------------------------------------------
======================这还不是重点================================
var a =0.123456789012345661
undefined
a
0.12345678901234566 //舍了我表示可以接受
--------------------------------------------------
var a =0.123456789012345660
undefined
a
0.12345678901234566
--------------------------------------------------
var a =0.123456789012345670
undefined
a
0.12345678901234566 //卧槽??????
--------------------------------------------------
var a =0.123456789012345680
undefined
a
0.12345678901234568//卧槽
-------------------------------------------------
var a=-0.12345678901234567890123456789
undefined
a
-0.12345678901234568
等待各位大大解惑+填坑 先给我解释下这诡异的17个数字上线好嘛?为啥是17???15我都理解 还有啊。。。。 这特么 var a=0.12345678901234567 a 0.12345678901234566 //自己华丽丽的变身是啥情况啊????????