mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
feat: add ternary conditional
This commit is contained in:
1 parent
0f92454648
commit
49c4cfbe72
1 file changed
+5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user