摘要: 想要直接统计对象的长度,但是又不想循环得到,有js的原生方法:Object.keys(obj); eg: let obj = { 'name' : 'Tom', 'age' : '22' }; let arr = Object.keys(obj); > arr的值为 [ 'name', 'age' 阅读全文
posted @ 2017-11-24 13:48 coconutGirl 阅读(202) 评论(0) 推荐(0) 编辑