黑马程序员技术交流社区
标题:
学习
[打印本页]
作者:
前端小林
时间:
2019-6-5 14:16
标题:
学习
1+2+" blind mine" "3 blind mine"
NaN==NaN false
NaN===NaN false
null : 无值,表示它的不是有效的Javascript类型
undefined : 已经声明但是没有定义的变量的值,对象的一个不存在的属性也是该值
null == undefined true
Boolean('') false
Boolean(0) false
Boolean(NaN) false
Boolean(null) false
Boolean(undefined) false
'78px'-1 NaN
NaN-1 NaN
null-1 -1
undefined-1 NaN
Number('78px') NaN
Number('aaa') NaN
Number(NaN) NaN
Number(null) 0
Number(undefined) NaN
parseInt('78px') 78
parseInt('aaa') NaN
parseInt(NaN) NaN
parseInt(null) NaN
parseInt(undefined) NaN
undefined.toString(); Cannot read property 'toString' of undefined
null.toString(); Cannot read property 'toString' of null
typeof 1 "number"
typeof NaN "number"
typeof '1' "string"
typeof true "boolean"
typeof null "object"
typeof undefined "undefined"
1+NaN NaN
1+null 1
1+undefined NaN
1+true 2
'1'+0 '10'
'1'+null '1null'
'1'+undefined '1undefined'
'1'+true '1true'
true+1 2
false+1 1
true+NaN NaN
true+null 1
true+undefined NaN
null+NaN NaN
null+null 0
undefined+NaN NaN
undefined+null NaN
undefined+undefined NaN
isNaN(''); false
isNaN('0'); false
isNaN(null); false
isNaN(NaN); true
isNaN(undefined); true
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2