append two arrays golang
package main
import "fmt"
func main() {
// Step 1: Declare and initialize two arrays
array1 := []int{1, 2, 3}
array2 := []int{4, 5, 6}
// Step 2: Concatenate the two arrays using the `...` syntax
result := append(array1, array2...)
// Step 3: Print the result
fmt.Println(result)
}