📜  使用 JavaScript While 循环进行迭代 - Javascript 代码示例

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

代码示例4
var ourArray = []; 
var i = 5;
do {
  ourArray.push(i);
  i++;
} while (i < 5); // it will work once and stop looping.