Goroutines returns data

Report a typo

Check the correct ways to return data from a goroutine.

a)

go quad := numberQuad(2)

b)

var result int
go func() {
    quad := numberQuad(2)
    result = quad * 3
}()

c)

var areas int
quad := make(chan int)
go workWithChannel(3, quad)
result := <-quad
areas += result

d)

var areas int
go func() {
    quad := numberQuad(2)
    result := quad * 3
}()
areas += result
Select one or more options from the list
___

Create a free account to access the full topic