Skip to content

product

Subhajit Sahu edited this page Aug 9, 2022 · 2 revisions

Find the product of numbers (∏).

Similar: sum, product.


function product(...xs)
// xs: a list of numbers

const xnumber = require('extra-number');


xnumber.product(1, 2);
// → 2

xnumber.product(1, 2, 3);
// → 6

xnumber.product(1, 2, 3, 4);
// → 24
Clone this wiki locally