Go slices
Slice is a useful data type that are used instead of arrays.
Declaring a slice
arr := [...]string{"a","b","c","d"}
Functions frequently used with slices
len() - length
cap() - capacity
Accessing slices
fmt.Printf(s1[1])
Slice is a useful data type that are used instead of arrays.
arr := [...]string{"a","b","c","d"}
Functions frequently used with slices
len() - length
cap() - capacity
fmt.Printf(s1[1])