Slice append function in Go February 26, 2021 63 1 minAppend an element to the slice:1 2 nums := []int{1, 2, 3} nums = append(nums, 4) Append multiple elements to the slice:1 2 nums := []int{1, 2} nums = append(nums, 3, 4) Append slice to another slice:1 2 3 4 5 nums := []int{1, 2} tens := []int{11, 12} nums = append(nums, tens...) // nums is {1, 2, 11, 12}