Slide 19
Slide 19 text
Object.
getOwnPropertyDescriptors
ࢦఆͨ͠ΦϒδΣΫτͷ
ͯ͢ͷPropertyDescriptors
Λऔಘ͢Δ
attributes
- value
- writable
- get
- set
- configurable
- enumerable
const obj = {
name: 'hello',
age: 24
};
Object.getOwnPropertyDescriptors(obj);
// Object { name: Object, age: Object }
/*
Object {
name: {
configurable: true,
enumerable: true,
value: "hello",
writable: true
},
age: ...
}
*/
tc39/proposal-object-getownpropertydescriptors