local function foo(x, y, z)
local x = x or true
local y = y or 1234
z = z or "default"
end
function foo(x, y, z)
x = (x == nil) or x
y = (y == nil and 1234) or y
z = (z == nil and "default") or z
print(x, y, z)
end
> foo()
true 1234 default
> foo(false, false, "me")
false false me
> foo(nil, 50, "me")
true 50 me