Array: size cố định, value type [5]int.
- Slice: dynamic, reference type
[]int. - Slice dùng phổ biến hơn.
make([]int, 0, 10)tạo slice capacity 10.append(slice, item)thêm phần tử. - Slice là view lên underlying array.
Array: size cố định, value type [5]int.
[]int.make([]int, 0, 10) tạo slice capacity 10. append(slice, item) thêm phần tử.Xem toàn bộ Golang cùng filter theo level & chủ đề con.
Mở danh sách Golang