Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone answer my question that i have been wondering in a long time?

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?

1 answer

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.