Answered step by step
Verified Expert Solution
Question
1 Approved Answer
All arrays, that may not look like it is defined, is suppose to be able to be interchangeable and already have a set array to
All arrays, that may not look like it is defined, is suppose to be able to be interchangeable and already have a set array to check from.
My code says that it's not able to add all numbers in the array, "numbers". I have to use a loop to iterate and add of keys to one variable, "sum".
Instructions Tests Array Iterating 1 function sumArray(numbers) { // YOUR CODE BELOW HERE // Create a function called sumArray var sum = 0; 1 parameter: numbers - an Array of Numbers returns: the sum of all numbers in the Array var currentNumber; for (i = 0; i returns 6 sumArray ([5, 10, 15]) //==> returns 30 22 23 Submit Run 24 Auto-Run FF ResetStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started