Javascript Array toInts()

Description

Javascript Array toInts()

Array.prototype.toInts = function(){
  return this.map(function(val){
    return parseInt(val, 10);
  });/*from w w  w  .  j a  v  a2 s .c o m*/
};

Javascript Array toInts()

Array.prototype.toInts = function() {
  return this.map(function(i){return +i;});
};



PreviousNext

Related