SOURCE

// null && undefined
console.log(null == 0) // false
console.log(NaN == 0) // NAN永不相等哦
console.log(undefined == 0) // false
console.log(null == undefined) // true!!!
console.log(null === undefined) // false
console.log(typeof null) // object
console.log(typeof undefined) // undefined
console.log('1_______________')
// 自身相等性
console.log(null == null)
console.log(null === null)
console.log(undefined == undefined)
console.log(undefined === undefined)
console.log(NaN == NaN) // NAN永不相等哦 false
console.log({} == {}) // 引用类型
console.log([] == []) // 引用类型
console.log('2_______________')
// arr 类型 
console.log(typeof []) // object
console.log([] instanceof Object) // true
console.log([] instanceof Array) // true
console.log(Object.prototype.toString.call([])) // [object Array]
console.log('3_______________')
// 关于类型转换
console.log(typeof 1.2) // float -> Number
console.log(typeof ('12' - 1)) // 减号操作为Number特有 -> 11
console.log(typeof ('12' + 1)) // // 加号首先识别为string + -> 121
console.log(Object.is(NaN, NaN)) // 两个值是否为同一个值
console.log(Object.is(+0, -0)) //两个值是否为同一个值
console.log(Object.is(NaN, 0)) //两个值是否为同一个值
console.log(+0 == -0) // true
console.log(+0 === -0) // true
console.log('离谱', [] + 0)
console.log('离谱', [] + '0')
console.log('离谱', {} + 0)
console.log('离谱', {} + '0')
console.log('离谱', undefined + '0') // 字符串处理
console.log('离谱', undefined + 0) // NaN 不合规计算
console.log('离谱', null + '1') // 字符串处理
console.log('离谱', null + 1) // 转换为0
console.log('4_______________')
// function
function a() { }
console.log(typeof a)
console.log(typeof new Function())
console.log(a instanceof Object)
console.log(a instanceof Function)
console.log(a + 1)
console.log(a + '1')
console.log('5_______________')
// false
console.log(null == false, null == true) //  false,false
console.log(undefined == false, undefined == true) //  false,false
console.log('' == false) // true
console.log('0' == false) // true
console.log(0 == false) // true
console.log({} == false, {} == true)  //  false,false
console.log([] == false) // true
console.log(NaN == false, NaN == true) //  false,false
.box {
    margin: 10px 10px
}
console 命令行工具 X clear

                    
>
console