会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
岭南灯火
博客园
首页
新随笔
联系
管理
2021年5月24日
JSON.stringify 函数与 Object.defineProperty 的坑:不可枚举属性无法写入
摘要: 例子 const obj = {} Object.defineProperty(obj, 'prop', { value: 10 }) JSON.stringify(obj) // 输出:{} 原因 好多博客介绍的是 “不可枚举” 的属性不会写入字符串,我也知道 function、日期、正则等无法写
阅读全文
posted @ 2021-05-24 03:40 岭南灯火
阅读(325)
评论(0)
推荐(0)
编辑
公告