Skip to content

Instantly share code, notes, and snippets.

@parvezmrobin
Last active October 16, 2019 14:55
Show Gist options
  • Save parvezmrobin/5e2a55e170dcc4d0f6f783b0f12adc76 to your computer and use it in GitHub Desktop.
Save parvezmrobin/5e2a55e170dcc4d0f6f783b0f12adc76 to your computer and use it in GitHub Desktop.
package main
func main() {
var a = [6]int {1, 2, 3, 4, 5, 6}
var sl = a[2:5]
println(sl[0]) // 3
sl[0] = 13
println(a[2]) // 13
var s2 = a[1:3]
s2[1] = 23
println(sl[0]) // 23
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment