Ok so in this challenge, were given this array. We have to multiply each number by its respective index position.
Then take each of the products and add them all together for the final answer.
I got each of the products, but i cant figure out why the .sum method isn’t working to add all the products.
First, the .sum method works perfectly fine on the original array. I even removed the brackets before and it still worked fine.
Second, the do statement works fine and my code isnt broken
In the pic, as soon as i call the .sum method on product i get this nomethoderror. When CLEARLY .sum is a method bc i just used it a min ago on the “numbers” array