Answers for "for i loop js"

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
1

for js

let str = '';

for (let i = 0; i < 9; i++) {
  str = str + i;
}

console.log(str);
// expected output: "012345678"
Posted by: Guest on September-15-2021
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