Learn to write core Go syntax fluently — declaring variables, choosing basic types, defining constants with iota, and steering programs with if, switch and Go's single for loop. You finish able to read and write small, idiomatic Go programs with functions, multiple return values, packages and fmt formatting, ready to tick "write core Go syntax" on any back-end role.
Watch the free preview
Declaring variables with var and := — free to watch, no account needed.
What you'll learn
- Write core Go syntax fluently across variables, types, control flow and functions
- Declare variables with var and := and choose the right basic type and zero value
- Define grouped constants and enumerations using const and iota
- Steer programs with if, switch and Go's single for loop
- Write functions with multiple return values and format output with the fmt package
Syllabus
Variables and Basic Types
Declaring variables with var and :=Free preview
Basic types, zero values and conversions
Constants and Control Flow Decisions
Constants and iota enumerations
Branching with if and switch
Loops and Functions
for — Go's only loop
Functions and multiple return values
Packages, Imports and Formatting
Packages and imports
Formatting output with fmt
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10