Now that Go is installed and you’ve run your first program, it’s time to learn the building blocks every Go program is made of: variables, types, operators, conditionals, and loops.
If you’ve never programmed before, this section is the most important in the entire course. Everything else builds on it.
What’s in this section
- Variables and Types — how Go stores data, the types you’ll use most often, and how constants differ from variables
- Operators and Conditionals — doing math, comparing values, and making decisions with
if/elseandswitch - Loops — repeating actions with
for, the only loop keyword Go has
Take your time with these lessons. Type out the examples, run them, and break them on purpose to see what error messages you get. That’s how the language sticks.