Hello.
I want to know what's the different between:
for _,event in pairs() do
and
for i,v in pairs() do
Can someone please tell me what's the different is?
Hello.
I want to know what's the different between:
for _,event in pairs() do
and
for i,v in pairs() do
Can someone please tell me what's the different is?
The i and v are just variable names. You can name them anything you want, although the most common naming is i and v which stand for index and value.
However if you i.e. don't need to use the index variable, you can name it _. It will prevent it from being declared as a variable, and trying to use _ as a normal variable will result in an error.
This discussion is preserved as it was. New answers, comments, and votes are closed.