Курси /
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
Все було зрозуміло?
Секція 4. Розділ 5
Зміст курсу
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
Все було зрозуміло?
Секція 4. Розділ 5