That's because arrays do get more complicated than flat lists like the example I gave above. You can actually have multiple organized data points in each position of the array as well, making arrays function more as a 2D relational database than as a flat list of data.
For example, I could make an address book array with multiple data points as such:
Then, I can retrieve a piece of information like Jane's phone number like this:
var janesnumber = addressbook[1].phone
Arrays are very powerful tools, especially once you start referencing other arrays in them, as it allows complex organization of data without always needing to resort to a database solution, with a whole new language to learn.
For example, I could make an address book array with multiple data points as such:
Then, I can retrieve a piece of information like Jane's phone number like this: Arrays are very powerful tools, especially once you start referencing other arrays in them, as it allows complex organization of data without always needing to resort to a database solution, with a whole new language to learn.