Slice and array of go
This time we will mainly discuss the array (array) type and slice (slice) type of Go language. They sometimes confuse beginners. They all belong to the type of collection class, and their values can also be used to store values (or elements) of a certain type.
The most important difference, however, is that the values of the array type (hereinafter referred to as arrays) are fixed in length, and the values of the slice type (hereinafter referred to as slices) are variable in length.
The length of an array must be given when it is declared, and it will not change after that. It can be sa...