Answers for "how to append a value to a array in golang"

Go
1

go append array to array

a := []int{1, 2}
b := []int{11, 22}
a = append(a, b...) // a == [1 2 11 22]
Posted by: Guest on March-29-2021
0

Append or Add to a Slice or Array in Go

numbers := []int{1,2}
numbers := append(numbers, 3, 4, 5) //Slice will become [1, 2, 3, 4, 5]
Posted by: Guest on December-29-2021

Code answers related to "how to append a value to a array in golang"

Browse Popular Code Answers by Language