创建一个百分百的纯对象,这个对象不会继承object的任何属性和方法,比如constructor,toString等
const pureObject = Object.create(null);
console.log(pureObject); //=> {}
console.log(pureObject.constructor); //=> undefined
console.log(pureObject.toString); //=> undefined
console.log(pureObject.hasOwnProperty); //=> undefined
|