2016年6月14日

浅谈JS的数组遍历方法

摘要: 用过Underscore的朋友都知道,它对数组(集合)的遍历有着非常完善的API可以调用的,_.each()就是其中一个。下面就是一个简单的例子: var arr = [1, 2, 3, 4, 5]; _.each(arr, function(el) { console.log(el); }); 上 阅读全文

posted @ 2016-06-14 17:03 ChessZhang 阅读(10908) 评论(0) 推荐(2) 编辑

导航