Edit It: Use the reduce() method to sum up the array
This code shows how to use the reduce() method to sum up an array in JavaScript.
See it on StackBlitzThis code shows how to use the reduce() method to sum up an array in JavaScript.
See it on StackBlitz