new tasks
This commit is contained in:
parent
2a4d27cea0
commit
80737d5a6a
1194 changed files with 15353 additions and 1 deletions
7
Task/Arrays/Lua/arrays.lua
Normal file
7
Task/Arrays/Lua/arrays.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
l = {}
|
||||
l[1] = 1 -- Index starts with 1, not 0.
|
||||
l[0] = 'zero' -- But you can use 0 if you want
|
||||
l[10] = 2 -- Indexes need not be continuous
|
||||
l.a = 3 -- Treated as l['a']. Any object can be used as index
|
||||
l[l] = l -- Again, any object can be used as an index. Even other tables
|
||||
for i,v in next,l do print (i,v) end
|
||||
Loading…
Add table
Add a link
Reference in a new issue