21 lines
336 B
Go
21 lines
336 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
myWords := make([]string,0,20)
|
|
myWords = append(myWords, "one","two","three")
|
|
fmt.Println(myWords)
|
|
anotherWords := []string{"1","2","3"}
|
|
myWords = append(myWords, anotherWords...)
|
|
fmt.Println(myWords)
|
|
|
|
mSlice := [][]int{
|
|
{1,2,3},
|
|
{2,3},
|
|
{1,1,1},
|
|
{2,2},
|
|
}
|
|
fmt.Println(mSlice)
|
|
}
|