RosettaCodeData/Task/Generic-swap/Lua/generic-swap-1.lua

3 lines
139 B
Lua
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
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