Saltar al contenido principal
Aprende en 10
HomeLessonsConditionalsLesson 05 · Logic
No prior experience · 10 min

Think in conditionals if it's yes, it's yes; if not, it's no.

Conditionals

If it rains, umbrella. If it doesn't rain, nothing. That's already a conditional.

In 10 minutes you'll read any «if… then… if not…» like a machine: condition, yes branch, and no branch. And you'll learn to dodge the trap of = vs ==.

The condition is just a yes-or-no question. The answer picks the branch.

  1. Condition

    The question that only accepts yes or no.

  2. Yes branch

    What happens if the condition holds.

  3. No branch

    What happens if it doesn't hold (else).

  4. The trap

    Compare properly: = assigns, == compares.

Keep going

Lessons that go with this one