← Lessons CREATOR PATH

πŸŒ‹ Choose Your Path

Lesson 12 of 20
πŸŒ‹
Themed Universe
Volcano Island
Code makes decisions β€” if lava is hot, the volcano erupts! πŸŒ‹
🎯 Missions
Make 3 different eruption predictions today!
Trigger the DANGER warning at least once!
Solve all 4 volcano puzzles β€” no hints!
● ● ● volcano.js JavaScript
1

        
      
observation deck LIVE
Click β–Ά Run to see your volcano's reaction…

πŸŒ‹ Volcano Puzzle Step 1 of 4

The volcano's temperature is 120. If it's above 100, print "ERUPT!".

πŸ’‘ Hint: Type: if (temp > 100) { console.log("ERUPT!"); }

πŸŒ‹ Choose Your Path

In Lesson 10 you stored values in var variables. In Lesson 11 you did math with + - * / %. Today on πŸŒ‹ Volcano Island, your code learns its most powerful trick: making decisions with if and else! Hot lava? ERUPT! Cool rock? Stay safe. The choice is yours β€” and your code's.

⚑ Comparison Operators
>greater than100 > 50 β†’ true
<less than30 < 80 β†’ true
>=at least100 >= 100 β†’ true
<=at most50 <= 50 β†’ true
===exactly equal"FIRE" === "FIRE" β†’ true
!==not equal5 !== 10 β†’ true
❓ if tests a question: if (temp > 100) { ... }
πŸ”€ If the answer is true, the code inside { } runs
🚫 else is the backup plan β€” runs when the test is false
▢️ Click β–Ά Run to test, then βœ“ Check to verify!