Knaph

Conditionals

Code that runs only when a condition is true - if, else, switch - letting a program make decisions.

Depth 1 · Foundation

You can write if/else branches and predict which one runs.

Sign in to prove what you know with a short quiz, see how deep you've gone, and earn XP for it.

Sign in with Google

Depths of understanding

  1. 1
  2. 2

    Deeper

    You read a condition as a logical statement - and can simplify, negate and combine conditions correctly.

Your path here

What's still between you and Conditionals, depth 1, in the order you can learn it.

  1. 1ProgramDepth 1 · Foundation · Program Basics
  2. 2ExpressionDepth 1 · Foundation · Program Basics
  3. 3Variables in codeDepth 1 · Foundation · Program Basics
  4. 4Program stateDepth 1 · Foundation · Program Basics
  5. 5Input and outputDepth 1 · Foundation · Program Basics
  6. 6Functions in codeDepth 1 · Foundation · Functions
  7. 7Return valuesDepth 1 · Foundation · Functions
  8. 8BooleansDepth 1 · Foundation · Control Flow
  9. 9ConditionalsDepth 1 · Foundation · Control Flow

Where it fits

Makes these deeper

Once you know Conditionals, come back to these — they'll mean more.