Lua defined two local variables for you with the same name 'a'. TheOn Fri, Aug 23, 2013 at 4:32 AM, Rafis DoctorInfo
> Why Lua 5.1 allows to define local variables more than once and not throws
> local a = 1
> local a = a or 2
> print(a) -- will print "1"
> function f(a)
> -- we don't see it, but variable `a` is already defined in function's
> -- and now we still can define local variable with same name `a`
> local a = a or 4
> f(3) -- will print "3"
second one shadows the first.