Skip to main content
Module

x/simplestatistics/index.js>product

simple statistics for node & browser javascript
Go to Latest
function product
import { product } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

The product of an array is the result of multiplying all numbers together, starting using one as the multiplicative identity.

This runs in O(n), linear time, with respect to the length of the array.

Examples

product([1, 2, 3, 4]); // => 24

Parameters

x

input