9.6 Handling Return Values
To call a function named buildMessageFor that takes two parameters and returns a result, on the other hand, we might write the following code:
let message = buildMessageFor(name: "John", count: 100)
In the above example, we have created a new variable called message and then used the assignment operator (=) to store the result returned by the function.
When developing in Swift, situations may arise where the result returned by a method or function call is not used. When this is the case, the return value may be discarded by assigning it to ‘_’. For example:
_ = buildMessageFor(name: "John", count: 100)