How is a message sent and received in Erlang?
For sending a message, you can use an exclamation mark (!) as the operator. The syntax that you can use for sending a new message is Pid ! Message.
For receiving a message, you can use Pattern Matching from the message queue receive a statement.