Answers for "for-of loop in JavaScript"

220

javascript for loop

var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) { 
  console.log(colors[i]);
}
Posted by: Guest on June-17-2019
8

javascript for of

const array = ['hello', 'world', 'of', 'Corona'];

for (const item of array) {
  console.log(item);
}
Posted by: Guest on March-13-2020
1

javascript for of loop

(function() {
  for (const argument of arguments) {
    console.log(argument);
  }
})(1, 2, 3);

// 1
// 2
// 3
Posted by: Guest on August-18-2020

Code answers related to "for-of loop in JavaScript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language