...

/

Exercise 2: Go Packages and Functions

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.

Problem

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?

Access this course and 1400+ top-rated courses and projects.