The pairs iterator function is provided by Lua; it is used to iterate over a table. The pairs function returns two variables—let's call them k and v. The k variable will contain the key being iterated over and the v variable will contain the value. v can be nil, but k cannot. The following code demonstrates using pairs to iterate over a simple table:
vector = { x = 34, y = 22, z = 56 }
for k, v in pairs(vector) do
print ("key: " .. k .. ", value: " .. v)
end