2808 explained code solutions for 75 technologies


golangHow to concatenate two slices


package main

import "fmt"

func main() {
	var s []int
	s = append([]int{1,2}, []int{3,4}...)
}ctrl + c
var s []int

declare s slice

append

appends given slices

[]int{1,2}

first sample slice

[]int{3,4}

second sample slice