Difference between revisions of "Pairs"
From OpenEUO
(Created page with "pairs (t) Returns three values: the next function, the table t, and nil, so that the construction for k,v in pairs(t) do body end will iterate over all key–value pairs ...") |
|||
Line 8: | Line 8: | ||
See function next for the caveats of modifying the table during its traversal. | See function next for the caveats of modifying the table during its traversal. | ||
+ | |||
+ | [[Ipairs]] | ||
[[Next]] | [[Next]] |
Latest revision as of 17:11, 7 October 2010
pairs (t)
Returns three values: the next function, the table t, and nil, so that the construction
for k,v in pairs(t) do body end
will iterate over all key–value pairs of table t.
See function next for the caveats of modifying the table during its traversal.