I believe to do it you use
table[index]
but I was wondering if there are other ways besides looping through the table?
I believe to do it you use
table[index]
but I was wondering if there are other ways besides looping through the table?
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.
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.
1 comment
I was curious as to whether or not you could do it without loops and indexing the table directly.