Why does this loop function not continue to count each item? That is after I add more items to the array. Why are extra items added to the array not counted after running the loop function? Repl link:
const fruits = ['banana','apple','peach','pear']
//console.log(fruits[0])
//console.log(fruits[1])
//console.log(fruits[2])
//console.log(fruits[3])
for (let i=0; i < fruits.length; i++) {
console.log(fruits[i])
}