How to implement a function which will return the sum of array's values?

Ask a question
1

I have an array with number values [1, 2, 3, 4], how to calculate the sum of its elements?

I thought $.each might be useful, but I’m not sure how to implement it.
The answer can be in JavaScript only too.

Thanks in advance.

Coin iconoffer bounty
add comment

0 Answer

Your Answer