Variables

Jul 1, 2023    m. Apr 15, 2025
local x = 10             --number
local x = 10.1           --number
local name = "John Doe"  --string
local isAlive = true     --boolean
local a = nil            --no value or invalid value

It is not an error to access a non-initialized variable; you just get the special value nil as the result:

print(b)
nil


Next: Constants