Junior — Senior
What result will the program with goroutines №23 output
livecode
Task condition
What will be the output of the program using multiple goroutines?
var total = 0
func main() {
for idx := 0; idx < 10; idx++ {
go func() { total++ }()
}
time.Sleep(2 * time.Second)
fmt.Println(total)
}