lua
Contents
About
Installation
Install lua
1 apt install lua-5.4
Specialties
- Dynamically typed
- Conditional evaluation
- Conditionals (such as the ones in control structures)
consider false and nil as false and anything else as true. Beware that, unlike some other scripting languages, Lua considers both zero and the empty string as true in conditional tests.
- Conditionals (such as the ones in control structures)
- Operators
Equality operator is ==
- Tables, functions and userdata is only equal if they reference the same object
Inequality operator is ~=
The operator and returns its first argument if it is false; otherwise, it returns its second argument.
The operator or returns its first argument if it is not false; otherwise, it returns its second argument.
- Table
- However, it is customary in Lua to start arrays with one (and not with zero, as in C) and the standard libraries stick to this convention.