File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,17 @@ for i, v := range myArray {
2828
2929If only one value is used on the left of a range expression, it is the 1st value in this table.
3030
31+ <div style =" overflow-x :auto ;-webkit-overflow-scrolling :touch " >
32+
3133| Range expression | 1st value | 2nd value (optional) | notes |
3234| :-----------------| :----------| :---------------------| :------|
3335| array or slice a ` [n]E ` , ` *[n]E ` , or ` []E ` | index ` i int ` | ` a[i] ` E |
3436| string s string type | index ` i int ` | rune ` int ` | range iterates over Unicode code points, not bytes |
3537| map m ` map[K]V ` | key ` k K ` | value ` m[k] ` V |
3638| channel c chan E | element ` e E ` | _ none_ |
3739
40+ </div >
41+
3842## Gotchas
3943
4044When iterating over a slice or map of values, one might try this:
You can’t perform that action at this time.
0 commit comments