if (!Array.prototype.map) { Array.prototype.map = function (fn) { 'use strict'; if (this === void 0 || this === null) { throw new TypeError(); } var t = Object(this); var len = t.length >>> 0; if (typeof fn !== 'function') { throw new TypeError(); } var res = new Array(len); var ctx = arguments.length >= 2 ? arguments[1] : void 0; var i; for (i = 0; i < len; i++) { if (i in t) { res[i] = fn.call(ctx, t[i], i, t); } } return res; }; }