A range loop allows iterating over different data structures:
String
Array
Pointer to an array
Slice
Map
Receiving channel
In general, range produces two values for each data structure except a receiving channel, for which it produces a single element (the value).








浙公网安备 33010602011771号