/
Value Types
Value Types
Lua variables can contain one type of value.
Data Type | Description | Example |
---|---|---|
nil | A value with no data (null not 0). A variable without an assigned value is nil by default. | local x
local x = nil |
boolean | Either true or false. | local x = true |
number | Any number, including fractional or negative numbers. | local x = 103.9 |
string | A string of text or characters. See Strings | |
table | See Lua Tables. | |
function | See Functions. | |
userdata | See User data type |
|
In the Translator, you can use type() to see the variable value:
, multiple selections available,
Related content
Variables
Variables
More like this
Lua tables as dictionaries
Lua tables as dictionaries
Read with this
The core eight types in Lua.
The core eight types in Lua.
More like this
Auto-Indentation
Auto-Indentation
Read with this
Example code showing the eight basic types in Lua
Example code showing the eight basic types in Lua
More like this
Block statements
Block statements
Read with this