1.
let d1 = Object.getOwnPropertyDescriptor({name: "hello"}, 'name');console.info(d1);
为什么打印出来是
{ value: 'hello', writable: true, enumerable: true, configurable: true }
而通过Object.defineProperties()定义的属性,这几个默认就是false
缥缈止盈
相关分类