Skip to content
Subhajit Sahu edited this page Jul 29, 2022 · 16 revisions

Finds sum of numbers (Σ).

Similar: sum, product.


math.sum(...n);
// n: a list of numbers
const math = require("extra-math");

math.sum(1, 2);
// 3

math.sum(1, 2, 3);
// 6

math.sum(1, 2, 3, 4);
// 10
Clone this wiki locally