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

Computing Term;-;, Can anyone help me 1 more time????

" indexing tables with integers", i see this term in programming lua edition I, what does "index" meaning?

1 answer

✓ Accepted answer

'Index' is a term referring to the location of a value in a table.

When you create a table like this

local table = {}
table[1] = "Hello"
table[2] = "World"

"Hello" is stored at index 1

"World" is stored at index 2

This is an example of 'indexing tables with integers' as the indexes we are using to store the two strings are.. integers!

Index simply refers to the 'key' we use the access the 'value' in the table. In Lua, we aren't limited to just using integers as keys. We can use (pretty much) anything, including strings, doubles, instances, and even other tables.

Hope this helps :)

2 comments

0

0H yeah, i can easily understand this, thanks a lot for the answer :)

0

I wrote this answer into my notebook :)

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