What is the difference between ipairs and In pairs?
THANKS
✓ ANSWER ACCEPTED
ipairs and in pairs?
1 answer
✓ Accepted answer
Not sure, but this is what it says on the wiki:
Ipairs: Returns three values: an iterator function, the table t, and 0, so that the construction will iterate over the pairs (1,t[1]), (2,t[2]), ···, up to the first integer key absent from the table.
Pairs: Returns three values: the next function, the table t, and nil, so that the construction will iterate over all key–value pairs of table t.
Pairs is here.
Ipairs is here.
I hope this helped you!
1 comment
0
Thank you
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
In the future, please use the search feature before asking Questions. https://scriptinghelpers.org/questions/4/whats-the-difference-between-pairs-and-ipairs