Constants

Jul 1, 2023  │  m. Jul 2, 2023 by Gleb Buzin

Constants are available since Lua 5.4:

local a <const> = 42
a = 100500

Produces an error:

lua: tmp.lua:2: attempt to assign to const variable 'a'


Next: Numbers