Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 137 Bytes

sum.md

File metadata and controls

8 lines (6 loc) · 137 Bytes

Array.prototype.sum()

Returns the sum of the elements of an array.

let arr = [4, 3, 1, 5, 11];
console.log(arr.sum()); // 24