摘要: 迭代器和for-of循环 es5使用内建的forEach方法来遍历数组 arr.foreach(function(value){ console.log(value); }); 这段代码看起来简洁,但这种方法有一个小缺陷:你不能使用break语句中断循环,也不能使用return语句返回到外层函数。 阅读全文
posted @ 2017-09-21 23:28 haveProgress 阅读(180) 评论(0) 推荐(0) 编辑