📌  相关文章
📜  null vs undefined - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:23.338000             🧑  作者: Mango

代码示例4
//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)