summaryrefslogtreecommitdiffhomepage
path: root/lua.html.markdown
diff options
context:
space:
mode:
authorMarcel Ribeiro Dantas, Ph.D <ribeirodantasdm@gmail.com>2022-08-01 09:41:15 +0200
committerGitHub <noreply@github.com>2022-08-01 09:41:15 +0200
commitce6226d3f5c5f8ed07bb7117b534509ce1c02f17 (patch)
treef2ac27192ef23dafe10d6a79f373dce17d967a56 /lua.html.markdown
parent905db48f6287e4946dc72965a813a045ab267732 (diff)
parente34431b31f9d32ac53088163c732b0ec6eef36bf (diff)
Merge pull request #4471 from chapeupreto/minor-lua-improvements
[lua/en] fix typos and minor improvements
Diffstat (limited to 'lua.html.markdown')
-rw-r--r--lua.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua.html.markdown b/lua.html.markdown
index 32512060..de71ccd4 100644
--- a/lua.html.markdown
+++ b/lua.html.markdown
@@ -58,7 +58,7 @@ foo = anUnknownVariable -- Now foo = nil.
aBoolValue = false
-- Only nil and false are falsy; 0 and '' are true!
-if not aBoolValue then print('twas false') end
+if not aBoolValue then print('it was false') end
-- 'or' and 'and' are short-circuited.
-- This is similar to the a?b:c operator in C/js:
@@ -193,7 +193,7 @@ end
-- A table can have a metatable that gives the table
-- operator-overloadish behavior. Later we'll see
--- how metatables support js-prototypey behavior.
+-- how metatables support js-prototype behavior.
f1 = {a = 1, b = 2} -- Represents the fraction a/b.
f2 = {a = 2, b = 3}
@@ -364,7 +364,7 @@ end)()
-- locals inside mod.lua are invisible outside it.
-- This works because mod here = M in mod.lua:
-mod.sayHello() -- Says hello to Hrunkner.
+mod.sayHello() -- Prints: Why hello there Hrunkner
-- This is wrong; sayMyName only exists in mod.lua:
mod.sayMyName() -- error