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 9 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?

1local result = mysplit("--", ".--") --Function returns a table with a table containing two items.
2 
3for i = 1, 2 do
4    print(result[i])
5end

Answer this question