diff --git a/source/_posts/lua.md b/source/_posts/lua.md index d0e11b3..815b935 100644 --- a/source/_posts/lua.md +++ b/source/_posts/lua.md @@ -185,6 +185,11 @@ elseif num < 10 then else print("num is 10") end + +-- making a ternary operator +-- This is similar to the a?b:c operator in C/js: +ans = aBoolValue and 'yes' or 'no' --> 'no' + ``` ## Loops