Skip to content

Instantly share code, notes, and snippets.

@lduboeuf
Created February 1, 2017 08:46
Show Gist options
  • Save lduboeuf/66e87d2d18e26d0f48ec70539534e574 to your computer and use it in GitHub Desktop.
Save lduboeuf/66e87d2d18e26d0f48ec70539534e574 to your computer and use it in GitHub Desktop.
--comment here
local str = "i'm a string"
local isOK = true
local number = 5
local decimal = 5.2
local car = 'T'
a, b, c = 1, 2, 3 --global vars: a==1, b==2, c==3
local atable = {1,2,3} -- simple table
function hello()
print("hello")
end
local hello2 = function()
print("hello again")
end
--for loop
local i
for i = 0, #atable, 1 do
print(atable[i])
end
if (a==1) then
print("kikou")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment