📌  相关文章
📜  undefined 和 null 的区别? - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:10.285000             🧑  作者: Mango

代码示例2
//loosely equal (compare values between two variables)
null == undefined // true  ( null => 0 , undefined => NAN)

//strictly not equal (compare both type and value) 
null === undefined // false  (typeof null => object , typeof undefined => undefined)
null !== undefined // true   (typeof null => object , typeof undefined => undefined)