Answers for "js for looop"

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
2

loop javascript

for (var i = 0; i < cats.length; i++) {
  if (i === cats.length - 1) {
    info += 'and ' + cats[i] + '.';
  } else {
    info += cats[i] + ', ';
  }
}
Posted by: Guest on July-21-2020
2

javascript for loop[

for(i=0;i<=5;i++){
  console.log(i);}
Posted by: Guest on June-12-2020
1

js for loop

i = 20
for (var n = 0;n == i;n++){
 	console.log("20 Times"); 
}
Posted by: Guest on June-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language