js 查看对象的属性特征

js 查看对象的属性特征,第1张

 

 

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 } }

 

js 查看对象属性特征

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/1006709.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存