Skip to content

product

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

Find the product of bigints (∏).

Similar: sum, product.


function product(...xs)
// xs: bigints

const xbigint = require('extra-bigint');


xbigint.product(1n, 2n);
// → 2n

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

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