I cannot process the table that the function returns. Can someone help me with this?
local grades = { Mary = "100", Teacher="100",'4','6'}
print "Printing grades!"
grades.joe = "10"
grades_copy = grades
for k, v in ipairs(grades) do
-- print "Grade:"
-- print(k, v)
end
function returntable()
tablein = grades
return 'hello'
end
grades_copy_table = returntable
--print(grades_copy_table)
In this program above, I want to access table elements through this "returntable" function, which returns a table.
source
share