Looping Through Arrays with for Loops in Javascript


Iterate over each item in an array.

Source Code

let fruits = ["Apple", "Banana", "Orange"];
for (let i = 0; i < fruits.length; i++) {
  console.log(fruits[i]);
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments