Answers for "what is fo javascript"

9

for of loop javascript

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 March-02-2020
5

javascript loop

var colors=["red","blue","green"];
for(let color of colors){
  console.log(color)
}
Posted by: Guest on December-06-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language