Javascript Array multiply(scalar)

Description

Javascript Array multiply(scalar)

Array.prototype.multiply = function(scalar) {
 for (var i = this.length - 1; i >= 0; i--) {
  this[i] *= scalar;//from  w  w w .  j a v  a  2s  .co  m
 };
}



PreviousNext

Related