Nodejs Utililty Methods Array Product

List of utility methods to do Array Product

Description

The list of methods to do Array Product are organized into topic(s).

Method

product()
Array.prototype.product = function() {
    var prod = 1;
    for (var i = 0; i < this.length; i++) {
        prod *= this[i];
    return prod;
product(begin, end)
Array.prototype.product = function(begin, end) {
  var total = 0;
  for (var i = begin >> 0 || 0, len = end + 1 >> 0 || this.length >> 0; i < len; i++) {
    total *= +this[i] || 0;
  return total;
};