Back to Loop Mini Program
Alien Lab Emergency

Real If / Then: Alien Chemistry

The reaction machine needs a scientist. Choose two strange chemicals, let JavaScript test the recipe, and discover what you created.

Your missionMake a blob, discover an alien, or trigger a wild explosion.
Enter the Alien Lab
10-15 minAges 9-12Real JavaScript
A glowing alien test tube A second glowing alien test tube Alien reaction vat
IF recipe matches...?THEN create!

A reaction is a decision

JavaScript asks whether both selected chemicals match a recipe. The && symbol means and: both comparisons must be true.

if (chemical1 === "Glorp Juice" &&
    chemical2 === "Wobble Dust") {
  make("Bouncing Blob");
}
Alien Lab Controls

Choose two chemicals.

Change either variable, then run the JavaScript to discover which condition matches.

+
JavaScript Condition

Which branch will run?

Reaction Chamber

What will the recipe make?

Ready to mix

Discover the special recipes. Every mixture creates something.