Back to Decision Builder
If / Then Lesson 1

Choice Challenge

Students edit a tiny real-code example and run it to see how a condition changes the result.

10-15 min Ages 6-9 Challenge If / Then
Challenge Editor

Make a choice program.

Change the condition, action, or message, then run the code.

Example code
let hasKey = true;

if (hasKey) {
  say("The door opens!");
} else {
  say("Find the key first.");
}
Output

Program result

Robot ready to speak your strings

Change true to false to test the other path.