Back to Developer Roadmap

make()

src/data/roadmaps/golang/content/[email protected]

4.0652 B
Original Source

make()

Creates and initializes slices, maps, and channels. Unlike new(), returns usable values. Examples: make([]int, 5, 10) for slices, make(map[string]int) for maps, make(chan int) for channels. Essential for initializing reference types.

Visit the following resources to learn more: