摘要: js 通过下面这种这种方式获取对象长度 var obj = {a:1,b:2,c:3};Object.getOwnPropertyNames(obj).length;会有点问题,比正常长度 +1正确的姿势:var obj = {a:1,b:2,c:3}; var arr = Object.keys( 阅读全文
posted @ 2019-04-12 17:02 queqp 阅读(265) 评论(0) 推荐(0) 编辑