next
next
next (TABLE, [INDEX])
Traverse all flelds of a table. Returns the next index of the table and its associated value. If INDEX is nil , returns the flrst index of the table and its associated value.When called with the last index, or with nil in an empty table, next returns nil . INDEX defaults to nil . next only considers flelds with non-nil values.Enumeration order is not specifled, even for numeric indices. (For numeric order, use a numerical for or the function foreachi). next is undeflned if you change the table during the traversal.