Key Concepts

Review core concepts you need to learn to master this subject

Go Pass by Value Parameter

When a Go function parameter is passed by value, it means only a copy of the value is accessed and manipulated inside the function. The original value of the variable that is passed as an argument to the function remains intact.

func makeMeOlder(age int) { age += 5 } func main() { myAge := 10 makeMeOlder(myAge) fmt.Println(myAge) // myAge is still 10 }
Learn Go: Functions
Lesson 1 of 2

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo