Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Generic-swap/Lua/generic-swap-1.lua
Normal file
2
Task/Generic-swap/Lua/generic-swap-1.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
x, y = y, x -- swap the values inside x and y
|
||||
t[1], t[2] = t[2], t[1] -- swap the first and second values inside table t
|
||||
4
Task/Generic-swap/Lua/generic-swap-2.lua
Normal file
4
Task/Generic-swap/Lua/generic-swap-2.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
x, y = 3, 4
|
||||
print(x, y) --> 3 4
|
||||
x, y = y, x -- swap
|
||||
print(x, y) --> 4 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue