mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[lua/en] Fixed formatting and variable names
This commit is contained in:
parent
057511f3a7
commit
5e4079fa33
@ -62,9 +62,10 @@ if not aBoolValue then print('twas false') end
|
|||||||
-- in C/js:
|
-- in C/js:
|
||||||
ans = aBoolValue and 'yes' or 'no' --> 'no'
|
ans = aBoolValue and 'yes' or 'no' --> 'no'
|
||||||
|
|
||||||
-- BEWARE: this only acts as a ternary value returned when the condition is true is not `false` or Nil
|
-- BEWARE: this only acts as a ternary if the value returned when the condition
|
||||||
ans1 = aBoolValue and false or true --> true
|
-- evaluates to true is not `false` or Nil
|
||||||
ans2 = aBoolValue and true or false --> true
|
iAmNotFalse = (not aBoolValue) and false or true --> true
|
||||||
|
iAmAlsoNotFalse = (not aBoolValue) and true or false --> true
|
||||||
|
|
||||||
karlSum = 0
|
karlSum = 0
|
||||||
for i = 1, 100 do -- The range includes both ends.
|
for i = 1, 100 do -- The range includes both ends.
|
||||||
|
Loading…
Reference in New Issue
Block a user