JavaScript中容易忽视的问题

1.最大数为2^53,+1还是2^53

2.String('A')==='A';new String('A')!=='A'

3.小数进行运算有精度一般不能这么用小数比较,可以扩大精度至整数

4.typeof null 为"object",null instanceof Object 为false

5.数组.filter时undefined不会触发

6.-9 % 2 = -1;后台语言会返回1

7.parseInt(A,B)  ;A为B进制的数,B为进制,结果返回10进制的数,B不合法就默认为10或者NaN。

8.Array.isArray( Array.prototype ) = true

9.var a = [0]; if (a) {console.log(a == true);}

10. map is only invoked for elements of the Array which have been initialized.

11. in javascript variables are tied to the arguments object so changing the variables changes arguments and changing arguments changes the local variables even when they are not in the same scope.

12.var a = 111111111111111110000, b = 1111; a + b;

13.https://javascript-puzzlers.herokuapp.com/

14.Number.MIN_VALUE == 5e-324

15.2 == [[[2]]]

16.3..toString() = "3"

17.name is a read only property

18.Date(0) 当前时间,new Date(0);1970

19.var min = Math.min(), max = Math.max() min > max  Infinity > -Infinity

转载于:https://www.cnblogs.com/sz-toosimple/p/11424611.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值