Last updated
⚠️ This is not a builtin function.
sum() is an array method, not a standalone function. See Array aggregating methods.
[10, 10, 5, 3, 5].sum()
// 33
[2, 5].sum()
// 7Call .sum() on an array to find the total value of all the numbers in that array.
Last updated