for loop shothand in js

Solutions on MaxInterview for for loop shothand in js by the best coders in the world

showing results for - "for loop shothand in js"
Aymen
01 Nov 2017
1const fruits = ["Apple", "Mango", "Peach"];
2
3for (let i = 0; i < fruits.length; i++) {
4  const fruit = fruits[i];
5  console.log(fruit);
6}
7
Alessio
08 Nov 2018
1const fruits = ["Apple", "Mango", "Peach"];
2
3for (let fruit of fruits) console.log(fruit);
4
similar questions
queries leading to this page
for loop shothand in js