2018-10-16 21:32:40 +05:30

14 lines
339 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Iterate with JavaScript While Loops
localeTitle: 在循环时使用JavaScript进行迭代
---
另一种类型的JavaScript循环称为`while loop`因为它`while`某些内容为true时运行并在某些内容不再为true时停止。
```
var ourArray = [];
var i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
```