-- ternary operator and the 'and' and 'or' quirky return: print(false and 1 or 2) --2 print(true and 1 or 2) --1 print(false and 1) --false determined the result print(true and 1) --1 determined the result print(1 or 2) --1 determined the result print(false or 2) --2 determined the result print(false or nil) --nil determined the result --tables local tab1 = {1; 2; 3; 4; 5; 6} local tab2 = {6, 5, 4, 3, 2, 1} for i=1, #tab1 do print(tab1[i]) end for i=1, #tab2 do print(tab2[i]) end