Javascript Array mul(value)

Description

Javascript Array mul(value)


/*//from   ww  w . ja  va 2  s.com
 * 
 */
Array.prototype.mul = function(value) {
 var newArray = new Array();
 for(var i=0; i<this.length; i++) {
  newArray[i] = this[i] * value;
 }
    return newArray;
}



PreviousNext

Related