Recap - Countdown
Part of the Fundamentals section of Coddy's Lua journey — lesson 76 of 90.
Challenge
EasyCreate a rocket launch countdown system that uses a numeric for loop with a negative step to simulate the final countdown sequence. Write a for loop that counts backwards from 10 down to 1, printing each number on a separate line.
After the countdown loop completes, print the message "Liftoff!" to signal that the rocket has launched. This demonstrates how the negative step parameter allows you to count backwards and how code after the loop executes once the loop finishes.
Try it yourself
-- TODO: Write your code here to create the countdown loop
-- TODO: Print the final message after the countdownAll lessons in Fundamentals
4Operators 2 Relational & Logic
Equality OperatorsRelational OperatorsThe 'and' OperatorThe 'or' OperatorThe 'not' OperatorShort-Circuit EvaluationTruthy and Falsy ValuesRecap - Simple Logic7Basic Conditional Logic
The if-then StatementThe if-then-else StatementThe elseif StatementRecap - Treasure Chest2Variables and Data Types
What is a Variable?NumbersStringsBooleansThe Value 'nil'The type() FunctionNaming ConventionsRecap - Character Profile5Basic Output
Printing LiteralsPrinting VariablesPrinting Multiple ValuesCombining Strings & VariablesThe tostring() FunctionInputCastRecap - Status ReportRecap - Till 1208String Manipulation Basics
string.len()string.upper & string.lowerstring.sub()string.rep()string.find()Recap - Format Username3Operators 1 Arithmetic & Conc
Arithmetic OperatorsModulo OperatorExponentiation OperatorString ConcatenationOperator PrecedenceRecap - Simple Calculations6Project: Character Stats Disp
Welcome MessageDeclare Character Stats9Functions Basics
Declaring a FunctionCalling a FunctionFunctions with ParametersFunctions with Multiple ParamsThe 'return' StatementRecap - Area Calculator12Loops Basics
The while LoopThe repeat-until LoopThe Numeric for Loopfor Loop with a StepThe 'break' StatementRecap - Countdown