Last active
July 5, 2019 07:51
-
-
Save xin053/8860309761e53748f1a049914ded2a15 to your computer and use it in GitHub Desktop.
[go for循环] for 循环 #go #for
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for init; condition; post {} | |
// 如同 c 的 while | |
for condition {} | |
// 死循环 | |
for {} | |
// 遍历数组,切片,字符串,map等 | |
for key, value := range aList {} | |
// 只取 key | |
for key := range aList {} | |
// 只取 value | |
for _, value := range aList {} | |
// 二维数组 for 循环节省内存 | |
for i := range [3][]int{} { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment