Sobes.tech
Junior — Senior

Launching goroutines in a loop and capturing variables

livecode

Task condition

Determine what output will be produced when executing the following program:

func main() {
    limit := 5000
    for i := 0; i < limit; i++ {
        go fmt.Println(i)
    }
}