Answers for "go copy to array"

Go
0

go copy to array

b = make([]int, len(a))
copy(b, a)
// or
b = append([]int(nil), a...)
Posted by: Guest on March-29-2021

Browse Popular Code Answers by Language