Answers for "for loop javasctip"

209

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
31

javascript loop

let array = ['Item 1', 'Item 2', 'Item 3'];

array.forEach(item => {
	console.log(item); // Logs each 'Item #'
});
Posted by: Guest on February-20-2020
0

javascript for loop

const Color = ["Red", "Blue", "Green"];
for (i = 0; i < Color.length; i++) { 
  console.log(Color[i]);
}
Posted by: Guest on July-19-2021
0

for loop javasctip

for(let i = 0; i < 5; i++) {
	console.log("loop", i);
}
Posted by: Guest on September-11-2021
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 "Java"

Java Answers by Framework

Browse Popular Code Answers by Language