摘要:
javascript中遍历的方式有很多种,今天下几种数据结构的遍历。 1. 对象的遍历 对象的遍历方式:Object.keys , for...in , Object.getOwnPropertyNames var obj = { a: "a", b: function() { console.lo 阅读全文
posted @ 2019-03-16 16:19
半夜盗贼
阅读(470)
评论(0)
推荐(0)
摘要:
最近在读underscore 的源码,发现了一个疑问,在underscore中有两个方法_.keys和_.allKeys 这两个方法都是用来获取对像的属性,两个之间有什么不同呢?先看下underscore源码 // Retrieve the names of an object's own prop 阅读全文
posted @ 2019-03-16 14:34
半夜盗贼
阅读(1101)
评论(0)
推荐(0)

浙公网安备 33010602011771号