

calling this last snippet of code an in pairs loop), and same thing when they encounter ipairs.

Most beginners learn this and just think it’s a solid set of keywords including pairs that can’t be changed (e.g. Where t is the table you wanna loop through (or in otherwords, iterate through). Most of the time, you’d find yourself writing this. Introductionįirst of all, I want you to change the way you view a generic for loop. You might’ve encountered this term before, when mentioning either pairs or ipairs. And for those wanting to dash through this, here is a tl dr version. In this article we’ll be covering an important chapter of the lua pil, iterator functions.
