July 2018
Beginner
202 pages
5h 42m
English
Tables in Lua have a constructor, which will index the table as an array. To use this constructor, you need to enter values without keys in the curly braces that create the table. The first value will be given a key of 1, and each subsequent value will have an index one higher than the last:
arr = { "monday", "tuesday", "wednesday" }for i=1,3 do print (arr[i])end