Javascript Array mul(other)

Description

Javascript Array mul(other)

Array.prototype.mul = function(other) {
  return Array.isArray(other) ? this[0]*other[0] + this[1]*other[1] : [this[0]*other, this[1]*other]
}



PreviousNext

Related