读取对象属性

Tags
javascript
Created
Aug 14, 2019 8:07 AM

https://tc39.es/ecma262/#sec-ordinary-and-exotic-objects-behaviours

设置属性对象上没有该属性时会从原型上检测属性描述符

```const foo = {}Object.defineProperty(foo, 'name', { writable: false, value: 'John'})const bar = Object.create(foo)bar.name = 'Arya'console.log(bar.name) // => John```

SuperMade with Super