[js] 数组镜像和映射
镜像 var arr = [1,2,3,4,5,6]; // 镜像 var newArr1 = []; arr.forEach( function(item){ // 将数据赋值到新数组中 newArr1.push( item ); }) console.log( newArr1 ); //[1,2,3,4,5,6]映射 var arr = [1,2,3,4,5,