freeCodeCamp/guide/chinese/javascript/loops/index.md

15 lines
678 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
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)