The "key" to understanding this is that in your example, 1 and 2 are not keys. They are indexes. If you want them to be keys they need to be strings like "1" and "2". The table data structure at the same time handles data accessed via index and key. Tables are also sparse in that the indexes do not have to be contiguous. E.g., you can have t[1], t[7] and t[13] without the expected t[2], t[3], etc. values. And as you have seen you have have arbitrary keys like "hello" and "a".
|