for(var j = 0,len = arr.length; j < len; j++){ console.log(arr[j]); } 在使用for循环时讲数组长度缓存,在处理大量数据时可以提升效率