Key Concepts

Review core concepts you need to learn to master this subject

Go If Statement

A Go if statement evaluates a condition and executes a statement block enclosed in curly braces {..} if the evaluation returns true. The condition may be optionally enclosed inside a pair of parentheses (...).

if (healthy) { fmt.Println("Work.") } if sick { fmt.Println("Stay home.") }
Learn Go: Conditionals
Lesson 1 of 1

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