โ ๐ Lua World
๐ VIP Door
You can practise without a player, but pick a player to score points!
๐ The mission
Today you unlock
If statements choose a path
An if statement checks a condition and chooses which answer to return. Order matters: check the special cases first.
๐ก Hint ladder
- >= means "bigger than or equal to".
- return level >= 5 โ comparisons already give true or false!
๐งช Coach checks
- โฏ level 7 enters
- โฏ level 5 just makes it
- โฏ level 4 blocked
- โฏ level 1 blocked
Live coach
Getting ready
โโโ
๐ฌ Comparisons like >= already give true or false โ return them directly!
function isHot(temperature) return temperature >= 30 end print(isHot(35)) -- true print(isHot(20)) -- false
๐ It printed:
Nice โ you saw it work!
๐ Output
๐งฉ Gaps filled! Ready to write it all yourself?