Javascript Array prefix(prefix)

Description

Javascript Array prefix(prefix)


Array.prototype.prefix = function (prefix) {
    var arr = [];
    for (i = 0; i < this.length; i++) {
        arr[i] = prefix + this[i];//w  w w.  jav  a  2s  . c  om
    }
    return arr;
};



PreviousNext

Related