Exercise 2: Go Packages and Functions

Let’s test our understanding by attempting this challenge.

We'll cover the following

Let’s practice what we’ve learned so far in the following exercise. The solution to this exercise has been provided in the next lesson.


Can you write a function that sorts three int values? Try to write two versions of the function: one with named returned values and another without named return values. Which one do you think is better?

Get hands-on with 1200+ tech skills courses.