Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ print("Hello World")
```

## Comments
## Single line comment
```lua
--this is a comment
print("hello") --this is another comment
-- the next line will not do anything because it is commented out
--print("world")
--print("world")
## Block comment/Multi-line comment
--[[This is how you block you comment with lua, and even if you press the enter within the square brackets, you will still be in comment section]]
```

## Variables
Expand Down Expand Up @@ -190,8 +193,8 @@ local milk = 110
local breadTax = calculateTax(bread) --27.3
local milkTax = calculateTax(milk) --23.1

print("Bread Tax = " .. breadTax)
print("Milk Tax = " .. milkTax)
print("Bread Tax = " .. breadTax)
print("Milk Tax = " .. milkTax)
```

```lua
Expand Down Expand Up @@ -308,7 +311,7 @@ end
```

```lua
--remove
--remove
local colors = { "red", "green", "blue" }
table.remove(colors, 1)
for i=1, #colors do
Expand Down