Course Content
Introduction to GoLang
Introduction to GoLang
Multiple Return Values
Similar to passing multiple arguments into a function, we can also retrieve multiple data values from the function.
The syntax for defining a function with multiple return values is as follows:
Below is an example of a function that returns two distinct values:
index.go
The returned values can be stored using the following syntax:
index.go
Complete the following code by selecting an appropriate answer:
Select the correct answer
Everything was clear?
Section 4. Chapter 5