会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
sxliuchunrong
博客园
首页
新随笔
联系
订阅
管理
2019年10月28日
前端技术之:如何在控制台将JS class实例输出为JSON格式
摘要: 有一个类: class Point { constructor(x, y) { this.x = x; this.y = y; } } 如果我们在控制台中输出其实例: console.log(new Point(10, 20)); 控制台中的输出结果为: Point { x: 10, y: 20 }
阅读全文
posted @ 2019-10-28 06:30 sxliuchunrong
阅读(996)
评论(0)
推荐(0)
公告