Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Return table's contents without for loop?

Asked by 8 years ago

In the code below I used a for loop that prints the value of two items in my table.

Is there a way to print the table's contents without the for loop?

local result = mysplit("--", ".--") --Function returns a table with a table containing two items.

for i = 1, 2 do 
    print(result[i])
end

Answer this question