js 查看对象的属性特征
时间:2021-07-02 16:01:40
收藏:0
阅读:0
var user = { name:"angdh", age:11, }; console.log( JSON.stringify(Object.getOwnPropertyDescriptors(user),null,2) );
{ "name": { "value": "angdh", "writable": true, "enumerable": true, "configurable": true }, "age": { "value": 11, "writable": true, "enumerable": true, "configurable": true } }
评论(0)