null 与 空对象 {} 的区别

985 阅读1分钟

null 是空指针对象,但是 null 的 __proto__ 也为空,{} 的 __proto__ 原型链上存在 Object.prototype

因此, null instanceof Object === false