> For the complete documentation index, see [llms.txt](https://pshizhsysu.gitbook.io/golang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pshizhsysu.gitbook.io/golang/goyu-yan-xun-huan-yu-ju.md).

# 循环语句

## for循环

### 类C语法

```
for i := 0; i < 10; i++ {
    fmt.Print(i)
}
```

### range

#### 数组与切片

```
for element := range arrayOrSlice { 
    fmt.Print(element)
}
```

#### 切片

## while循环
