What is in Ipairs?

Just found out about this existence of in Ipairs, what is it? and how is it different from using in pairs?

1 Like

Answer is pairs is used with dictionaries while ipairs is used for arrays. Unlike pairs, ipairs run in a sorted way also ipairs loop will stop running if it encounters a nil value.

1 Like

I see, thank you for the explanation sir.

Just for the record, this question is asked here about once a week. Please make sure in the future to look around for the answer before asking a question.

1 Like