Answers for "for loop shothand in js"

0

for loop shothand in js

const fruits = ["Apple", "Mango", "Peach"];

for (let i = 0; i < fruits.length; i++) {
  const fruit = fruits[i];
  console.log(fruit);
}
Posted by: Guest on September-20-2021
0

for loop shothand in js

const fruits = ["Apple", "Mango", "Peach"];

for (let fruit of fruits) console.log(fruit);
Posted by: Guest on September-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language