🔄Arrays
How to work with Arrays in Golang?
Arrays start at index 0
Declaration
Accessing
Assigning
Appending
Deleting
Tips
Tip: While defining variable, You can use
...
to let the compiler count the size for you
Note: While defining variable, if is not specified, it is unbounded
Note: When you use
arr[0:3]
you get the elements including index 0 to index 3, excluding index 3 (so 0, 1, 2)
Last updated