Array.prototype.map(func)方法的实现
var arr1 = [ 1 , 2 , 3 , 4 , 5 ];alert(arr1. map (function(element) { return element * 2 ;})); // 输出:[ 2 , 4 , 6 , 8 , 10 ]function MyArray(arr) {this.arr = arr;}MyArray. prototype . map = function(func) {var newArr = []; for (var i =...