Home »
Code Examples »
Lua Code Examples
Lua - Demonstrate the example of global variable Code Example
The code for Demonstrate the example of global variable
-- Global variables do not need declarations.
-- You simply assign a value to one to create it
print( s )
s = "Hello, world!"
print( s )
--[[
Output:
nil
One million dollars
--]]
Code by IncludeHelp,
on August 25, 2022 22:40
Reference:
Global