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

What is the easiest way to index a table?

I believe to do it you use

table[index]

but I was wondering if there are other ways besides looping through the table?

2 answers

You loop through a table if you don't know all indices.

For table indexing you generally use table[index]... this is also the "easiest" way.

1 comment

0

I was curious as to whether or not you could do it without loops and indexing the table directly.

Honestly, my favorite indexing is table.index, but that only works with strings that doesn't start with numbers and has no spaces. Only when I have varying index I use the square brackets.

This discussion is preserved as it was. New answers, comments, and votes are closed.