Introduction
The Channels challenge is designed to test your understanding of channels in Golang. Channels are used to connect concurrent goroutines, allowing values to be sent and received between them.
The Channels challenge is designed to test your understanding of channels in Golang. Channels are used to connect concurrent goroutines, allowing values to be sent and received between them.
In this challenge, you are required to create a new channel and send a value into it from a new goroutine. You will then receive the value from the channel and print it out.
make(chan val-type)
syntax to create a new channel.channel <-
syntax to send a value into the channel.<-channel
syntax to receive a value from the channel.## When we run the program the `"ping"` message is
## successfully passed from one goroutine to another via
## our channel.
$ go run channels.go
ping
## By default sends and receives block until both the
## sender and receiver are ready. This property allowed
## us to wait at the end of our program for the `"ping"`
## message without having to use any other synchronization.
The Channels challenge tests your ability to use channels in Golang to send and receive values between concurrent goroutines. By completing this challenge, you will have a better understanding of how channels work and how they can be used to improve the performance of your Golang programs.