-- generic for with ipairs yields index, value local colors = {"red", "green", "blue"} for index, color in ipairs(colors) do print(index, color) end
ipairs walks array entries in order