logical operators

The logical operators are and, or, and not. Like control structures, all logical operators consider false and nil as false and anything else (including zero) as true. The operator and returns its first argument if it is false; otherwise, it returns its second argument. The operator or returns its first argument if it is not false, otherwise, it returns its second argument.

Both and and or use short-cut evaluation, that is, they evaluate their second operand only when necessary.

A useful technique is to use the ability of or to return its first argument if it is not false to quickly test if a variable exists. For example:
t = t or {} -- create table if it does not exist
The operator not always returns true or false.

Lua keyword/topics

Topics