3
Is there any difference between in ipairs
and in pairs
?
Which?
a = {1, "b", 3, "d"}
for i, v in pairs(a) do print(i, v) end
print("Ipairs")
for i, v in ipairs(a) do print(i, v) end
Returns:
1 1
2 b
3 3
4 d
Ipairs
1 1
2 b
3 3
4 d
Just to complement, I ran the test on http://ideone.com/eixTay
– Gabriel Sales