Beginner Go (Golang)
Q18 / 100

What does make() do in Go?

Correct! Well done.

Incorrect.

The correct answer is B) Initializes and returns slices, maps, and channels

B

Correct Answer

Initializes and returns slices, maps, and channels

Explanation

make([]int, 5, 10) creates a slice with length 5, capacity 10. make(map[string]int) initializes a map. make(chan int, 10) creates a buffered channel.

Progress
18/100