Lua Programming/truth

From Wikibooks, open books for an open world
Jump to navigation Jump to search

In lua, expressions of truth evaluate to a boolean value of true or false. In lua, all values are true, except nil and false.

Lua provides keywords for true and false[edit | edit source]

The lua programming language provides the keywords true and false to represent values of truth in an expression.

Lua provides a boolean datatype[edit | edit source]

The boolean datatype can be used to hold a boolean value.