c = {1,2,"a","d",c = 12, q = 20}
for i,v in pairs(c) do
print(i,v)
end
I'm trying to understand this code. So does pairs basically turn i and v to variables of the table c in this script? I get what this script does and I get if you change the letter in parenthesis after pairs and the letter before table to the same the script still works. I just cant get myself to understand this like why would people do it like this, maybe we need two variables for the same table? since pretty much i and v equal the same thing now? I might sound a bit lost but yeah.
Update: How come when i print i by itself when theres a variable the variable letter prints. and but when i print v by it self the variable value prints
