Answers for "es6 for-of loop"

4

javascipr for of

const array1 = ['a', 'b', 'c'];

for (const element of array1) {
  console.log(element);
}

// expected output: "a"
// expected output: "b"
// expected output: "c"
Posted by: Guest on September-16-2020
1

for of loop in es6

let colors = ['Red', 'Blue', 'Green'];
for (let color of colors){
	console.log(color);
}
Posted by: Guest on April-25-2020
0

es6 for-of loop

for (let itme of list) {
  ...
}
Posted by: Guest on September-20-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language