js运算符

1.===和!==

将严格比较值和类型,例如 “5”==5 为true,而“5”===5为false

2.逗号运算符

返回最右边表达式的值,例如

alert((a=5,b=3,c=6));

输出6

3.void运算符

强制使表达式没有返回值,例如

alert(void (a=5,b=3,c=6));

输出undefined

4.typeof和instanceof

typeof输出变量类型,可以用typeof a或typeof(a)

instanceof,判断变量是否为xx类型的实例,例如a instanceof Array

原文地址:https://www.cnblogs.com/punkrocker/p/4775739.html