15 lines
678 B
Markdown
15 lines
678 B
Markdown
---
|
||
title: Loops
|
||
localeTitle: 循环
|
||
---
|
||
循环在JavaScript中用于根据条件执行重复任务。条件通常在分析时返回`true`或`false` 。循环将继续运行,直到定义的条件返回`false` 。
|
||
|
||
循环有三种常见类型:
|
||
|
||
* [对于](http://forum.freecodecamp.com/t/javascript-for-loop/14666)
|
||
* [而](http://forum.freecodecamp.com/t/javascript-while-loop/14668)
|
||
* [做的](http://forum.freecodecamp.com/t/javascript-for-loop/14662)
|
||
|
||
您可以键入`js for` , `js while`或`js do while`以获取有关这些内容的更多信息。
|
||
|
||
> 链接: [MDN **for循环**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) |