所有假设都是真的:
alert( "null==undefined: " + (null == undefined) )
alert( "null==0: " + (null == 0) ) // why false??
alert( "false=='': " + (false == '') )
alert( "true==1: " + (true == 1) )
alert( "true=='1': " + (true == '1') )
alert( "'1'==1: " + ('1' == 1) )
所有假设都是错误的:
alert( "null===undefined: " + (null === undefined) )
alert( "null===0: " + (null === 0) )
alert( "false==='': " + (false === '') )
alert( "true===1: " + (true === 1) )
alert( "true==='1': " + (true === '1') )
alert( "'1'===1: " + ('1' === 1) )
为什么 (null == 0) 为假
我使用最后一个 chrome 来测试它。