Translations:Help:Lua/Lua best practice/80/en

Lua does not have a ternary conditional operator, but you can do the same anyhow with an  and an. What goes on is although a little mysterious to newcomers to Lua. The operators  and   pass on truthy values (materialized values), and thus they can be part of other expressions than just logical ones.