DEV Community

Discussion on: Introduction to Arrays and Loops

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Two minor vocabulary nitpicks:

Collection: A computer programming term for a list of items. An array is just one kind of collection

It's the other way around: Lists are a type of Collection. There's also collections that aren't lists, like sets or maps, but all lists are collections.

The index of an element in an array is its numerical position.

In that case, the first element would have the index 1. In JS, the index isn't the numerical position but the offset from the first element.

Collapse
 
saoud profile image
Saoud

Thanks for the info!