[JavaScript] 纯文本查看 复制代码 Array.prototype.fill = function(value, start, end) {
start = start || 0;
end = end || this.length;
for (var i = start; i < end; i++) {
this = value
}
return this
};
if (typeof Array.prototype.map != "function") {
Array.prototype.map = function(fn, context) {
var arr = [];
if (typeof fn === "function") {
for (var k = 0, length = this.length; k < length; k++) {
arr.push(fn.call(context, this[k], k, this))
}
}
return arr
}
}
function Ra() {
return d = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678", new Array(10).fill(1).map(function() {
return d.charAt(Math.floor(Math.random() * d.length))
}).join("");
var d
}
|