//判断是否是Nullfunction isNull(obj){return obj === null
}//判断是否是NaNfunction isNaN(obj){return obj !== obj
}//判断是否是undefinedfunction isUndefined(obj){return obj === void 0
}`
通过Object.is()方法,可以准确判断变量是否为 nulllet a = null
let b = {}
let c
Object.is(a, null)// true
Object.is(b, null)// false
Object.is(c, null)// false