Utilize array methods for powerful data manipulation and querying.
Source Code
let numbers = [1, 2, 3, 4, 5];
let sum = numbers.reduce((acc, current) => acc + current, 0);
console.log(sum); // Sum of numbers
Utilize array methods for powerful data manipulation and querying.
let numbers = [1, 2, 3, 4, 5];
let sum = numbers.reduce((acc, current) => acc + current, 0);
console.log(sum); // Sum of numbers