178k views
0 votes
What is the purpose of i in the code?

for (var i = 0; i < fruitList.length; i++ ) {
console.log (fruitList [ i ] );
}

User BlessedHIT
by
6.2k points

1 Answer

2 votes

Answer:

i is a variable used to store information in this case the number 0. The i is then added to repeatedly to create a list.

User Joshlrogers
by
6.3k points