RosettaCodeData/Task/Generic-swap/Lua/generic-swap-1.lua
2023-07-01 13:44:08 -04:00

2 lines
139 B
Lua

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