Browse Source

slice

pull/1/head
dewjjj 8 months ago
parent
commit
d3e5f692ef
  1. 14
      slice/slice.go

14
slice/slice.go

@ -0,0 +1,14 @@
package main
import "fmt"
func main() {
medals := []string{"gold", "sliver", "bronze"}
medals[0] = "gold0"
medals[1] = "sliver1"
medals[2] = "bronze2"
fmt.Println(medals)
for i, v := range medals {
fmt.Println(i, v)
}
}
Loading…
Cancel
Save