
A condition is a decision point in your code. Dart checks whether something is true or false and then runs different code depending on the answer.
Complete all 8 mini-games below to build a solid understanding of conditions — from reading them to writing your own.
Pick the right if/else branch for each light colour.
The traffic light is showing a colour. Read the Dart code and choose what happens next. Each round teaches you a different branch.