Last active
October 16, 2019 14:55
-
-
Save parvezmrobin/5e2a55e170dcc4d0f6f783b0f12adc76 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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