Inline conditions in Lua (a == b ? “yes” : “no”)?

Sure:

print("blah: " .. (a and "blah" or "nahblah"))

Leave a Comment