Slide 15
Slide 15 text
Tables (cont.)
both keys and values can of any type, but by
default keys are strings
numbers = {[12] = 'twelve', [13] = 'thirteen',
[14] = 'fourteen'}
tables can represent arrays
array = {'a', 'b', 'c'}
this is really a table. it is stored as this:
{1 = 'a', 2 = 'b', 3 = 'c'}
getting the length of array is easy
length = #array > 3