📜  for循环数组javascript代码示例

📅  最后修改于: 2022-03-11 15:03:23.648000             🧑  作者: Mango

代码示例6
var i; //defines i
for (i = 0; i < 5; i++) { //starts loop
  console.log("The Number Is: " + i); //What ever you want
}; //ends loop
//Or:
console.log("The Number Is: " + 0);
console.log("The Number Is: " + 1);
console.log("The Number Is: " + 2);
console.log("The Number Is: " + 3);
console.log("The Number Is: " + 4);
//They do the same thing!
//Hope I helped!