Posted 21 March 2016 - 03:16 AM
I am using computercraft version 1.78 for minecraft 1.8.9
When I tried to print the contents of the table it would print the key and the corresponding value together, but it would chose a key at random to print.
The result from running the program is as follows
When I tried to print the contents of the table it would print the key and the corresponding value together, but it would chose a key at random to print.
local table = {January=31, February=28, March=31, April=30, May=31, June=30, July=31, August=31, September=30, October=31, November=30, December=31
for key,value in pairs(table) do
print(key)
print(value)
end
The result from running the program is as follows
December
31
May
31
April
30
January
31
August
31
July
31
September
30
February
28
October
31
June
30
March
31
November
30