CC-07: Array Iteration
Last updated
Last updated
with Carmen Salas • 2024/10/15
slides review...
for...of
syntax when looping through an iterable's values:
for...in
syntax when looping through an iterable's enumerables:
Declare a function named sumInArray that will calculate the sum of all the elements in an array of numbers. You must solve this without using any built-in array methods and iterating through the array.
Declare a function named averageInArray that will calculate the average of the elements in an array of numbers. You must solve this without using any built-in array methods and iterating through the array.