Skip to main content

_G

Static _G 

Source
pub static _G: table
Expand description

A global variable that holds the global environment itself.

Lua does not use this value; changing it does not affect any environment. Setting a field in _G is the same as assigning to a global variable.

§Examples

x = 10
print(_G.x)    --> 10
_G.y = 20
print(y)       --> 20