2 ms·
> function f(a, b, c, d) a = a or 1 b = b or 2 c = c or 3 d = d or 4 end Compare with: f = (a=1, b=2, c=3, d=4) -
by shalabhc 9y ago
>
function f(a, b, c, d)
a = a or 1
b = b or 2
c = c or 3
d = d or 4
end
Compare with:
f = (a=1, b=2, c=3, d=4) -> ...
Also note the latter is correct when you call it as f(false).