I've just been reading the Wiki page on Tables, and when I read the section about iterating over a table, it says:
You should use ipairs to iterate over arrays, rather than pairs.
Why is this true?
I'm not that good with arrays, but I can provide a reason for this nonsense. You see, iPairs is also used because it does this in an Order, and sometimes Order is preferred in tables. That's one of the reasons iPairs is used instead of Pairs. iPairs does it in an order, Pairs does not.
iPairs also stops when a nil value is returned. Sometimes this is useful for some scripts, sometimes it is not. It is a reason why I personally, and many people prefer Pairs over iPairs.
###########Pls don't hurt me, I was reading forums and encountered this.