The Language
Part of the Fundamentals section of Coddy's Lua journey — lesson 1 of 90.
Lua is designed to be simple and easy to understand, making it an excellent choice for new programmers. It's used in many applications, from game development to web servers, because of its flexibility and straightforward syntax.
Challenge
EasyWrite your first Lua program using the print() function to display the message Hello Lua! on the screen.
What to do:
- Look at the code:
print("Hello Lua!") - Press the "Run" button to execute it
- You should see "Hello Lua!" appear in the output
Cheat sheet
To display text on the screen in Lua, use the print() function:
print("Hello Lua!")Try it yourself
print("Hello Lua!")All 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 Calculator