Task of Challenge #10/54

 Calculate the sum of numbers in an array of numbers. The array: [1, 9, -19, 3, 5, 3, 7, 14, 91].

Solution

Explanation

To accomplish our task, we need to iterate over the array and build the sum out of each element.

Since we aren’t so experienced right now, we should not use the reduce() function. Instead, we write basic operations like this with a for loop

After the loop has finished, we print it out to the console:

Follow me on Instagram and don’t miss the latest Challenge!

https://www.instagram.com/arnold.code/

Become a bullet proof developer and seek my coding adventures on Udemy

https://www.udemy.com/user/arnold-abraham-3/

Don’t miss two of my most read Medium Articles