summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTopher <kanjoti@gmail.com>2018-08-08 19:24:40 +0300
committerGitHub <noreply@github.com>2018-08-08 19:24:40 +0300
commit5e4079fa338040a6ee6951a61ace90e87a925159 (patch)
tree1673a8fd7e6674d693c39d7598f7de05ca7146b1
parent057511f3a7cf41f7fc524504a063c261c0ddf836 (diff)
[lua/en] Fixed formatting and variable names
-rw-r--r--lua.html.markdown7
1 files changed, 4 insertions, 3 deletions
diff --git a/lua.html.markdown b/lua.html.markdown
index 2139003a..32174a81 100644
--- a/lua.html.markdown
+++ b/lua.html.markdown
@@ -62,9 +62,10 @@ if not aBoolValue then print('twas false') end
-- in C/js:
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
-ans1 = aBoolValue and false or true --> true
-ans2 = aBoolValue and true or false --> true
+-- BEWARE: this only acts as a ternary if the value returned when the condition
+-- evaluates to true is not `false` or Nil
+iAmNotFalse = (not aBoolValue) and false or true --> true
+iAmAlsoNotFalse = (not aBoolValue) and true or false --> true
karlSum = 0
for i = 1, 100 do -- The range includes both ends.