数组的foreach方法和jQuery中的each方法
数组的foreach方法和jQuery中的each方法/** 数组的forEach方法:* 1、返回给回调的参数先是值,然后是下标* 2、回调函数执行时内部的this指向window* *//*var arr = [1,2,3,4,5];arr.forEach(function( val, index ) {console.log( val, index, this );});*...