Javascript Array convertToIntArray()

Description

Javascript Array convertToIntArray()


/**/*from  w w  w . j av  a  2 s  .c  o m*/
 * Created by Ruby on 2015/9/1.
 */
Array.prototype.convertToIntArray = function () {
    var arr = [];
    for (var i = 0; i < this.length; i++) {
        arr.push(parseInt(this[i]));
    }
    return arr;
};



PreviousNext

Related