mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 21:44:45 +03:00
feat: add example for thrown away split initialization var
This commit is contained in:
1 parent
c56683d28d
commit
b85c043af2
1 file changed
+3
@@ -47,6 +47,9 @@ The famous "Hello World" program in Lua
|
||||
local age = 18 -- local variable
|
||||
boys, girls = 2, 3 -- global variables
|
||||
|
||||
-- Now x = 1, y = 2, z = 3, and 4 is thrown away.
|
||||
x, y, z = 1, 2, 3, 4
|
||||
|
||||
-- Undefined variables return nil.
|
||||
-- This is not an error:
|
||||
foo = anUnknownVariable -- Now foo = nil.
|
||||
|
||||
Reference in new issue
Block a user