What is the difference of pairs() vs. ipairs() in Lua?
pairs() and ipairs() are slightly different. pairs() returns key-value pairs and is mostly used for associative tables. key order is unspecified. ipairs() returns index-value pairs and is mostly used for numeric tables. Non numeric keys in an array are ignored, while the index order is deterministic (in numeric order). This is illustrated by the following … Read more