Home / Guides
Guides for your first decisions in code
Three evergreen guides on conditions, branches and control flow — the part of programming beginners get stuck on and nobody explains slowly.
What Is an If Statement? A Beginner’s Guide to Conditional Code
What an if statement is, the three parts every one has, where conditions come from, and the five mistakes that catch almost every beginner.
Read the guide → Guide · 9 min readIf Else Statement: How to Make Your Code Choose a Path
How if else turns a skipped line into a real decision: else if chains, why branch order is logic, guard clauses instead of nesting, and the mistakes to avoid.
Read the guide → Guide · 9 min readHow to Write an If Statement: A Step-by-Step Method for Any Language
A four-step method for writing an if statement: state the rule, name the variable, choose the operator, test both paths — with the syntax for Python, JavaScript, Go and more.
Read the guide →How to use these guides
Read What Is an If Statement first if the word “condition” still feels fuzzy. Then read the if/else guide to learn how a program chooses between two paths, and the how-to guide when you want to sit down and actually write one. Type every example by hand — reading code feels like learning; typing it is learning.
Ask a question
Send the code you are stuck on. We will tell you which line is deciding the wrong thing.