Update Translation for Chinese (#22249)

This commit is contained in:
Kalock
2018-12-29 07:58:32 +08:00
committed by Jingyi Ding
parent 80758a4b98
commit bde0a55554

View File

@ -1,15 +1,15 @@
--- ---
title: For Loop title: For Loop
localeTitle: 对于循环 localeTitle: For循环
--- ---
# 对于循环 # For循环
`for`循环执行代码块直到指定的条件为false。当迭代次数可变时使用`while`循环,否则使用`for`循环。 `for`循环的常见用途是数组迭代。 `for`循环执行代码块直到指定的条件为false。当迭代次数可变时使用`while`循环,否则使用`for`循环。 `for`循环的常见用途是数组迭代。
## For循环的语法 ## For循环的语法
```c ```c
for ( init; condition; increment ) { for(init; condition; increment){
statement(s); statement(s);
} }
``` ```
@ -39,8 +39,8 @@ for ( init; condition; increment ) {
```shell ```shell
> Item on index 0 is 1 > Item on index 0 is 1
> Item on index 1 is 2 > Item on index 1 is 2
> Item on index 2 is 3 > Item on index 2 is 3
> Item on index 3 is 4 > Item on index 3 is 4
``` ```