Appends elements to the end of a slice and returns the updated slice.
Syntax
append(s []T, elems ...T) []TExample
Enter values below to update the example in real time.
append→fmt→Println→s := []int{1, 2, 3}
s = append(s, 4, 5)
fmt.Println(s) // [1 2 3 4 5]