Answers for "for loop js in"

4

for in js

var colors=["red","blue","green"];
for(let col of colors){
  console.log(col);
}
// red
// blue
// green
Posted by: Guest on March-19-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language