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

3 lines
139 B
Lua
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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