Originally Posted by Taroven
Code:
local foo = {}
foo.bar = nil
print(foo.bar or "LOL")
-- Result: nil
|
That's odd, because the expression nil acts as false, so this should return "LOL" as well regardless of whether or not nil was manually assigned to the variable or table entry.
Edit: Just to make sure, I ran this through Lua and it works as I had described.