Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 264 Bytes

new-object-vs-object-vs-object.create-null.md

File metadata and controls

7 lines (4 loc) · 264 Bytes

new Object vs Object vs Object.create(null)

new Object() 和 Object 是一样的,都会创建一个对象实例

但是Object.create(null) 会创建一个空对象的实例

区别在于Object.create(null) 的实例是没有__proto__,而前两者都有