For this lesson it says that ‘’ Our condition for this loop is 'i < arr.length
, which stops the loop when i
is equal to length ‘’ .
shouldn’t it be “which stops the loop when ‘i’ is ONE less than length”?
If the condition met the array length, then there would be no number after the last iteration of the loop because arrays have zero based indexing?.
Challenge: Iterate Through an Array with a For Loop
Link to the challenge: