Solution Review: Summing the Integers
This lesson discusses the solution to the challenge given in the previous lesson.
package mainimport ("fmt")func sum(x, y int, c chan int) {c <- x + y}func main() {c := make(chan int)go sum(12, 13, c)fmt.Println(<-c) // 25}
Get hands-on with 1400+ tech skills courses.