ELI5: what is an array
// explanation
What is an array?
An array is like a special box or a spice rack that holds a bunch of things in a row [1][3]. Instead of having many separate boxes, you have one box with different spots inside, and each spot can hold one item [1].
Why do we use arrays?
Arrays help us keep lots of similar items organized in one place so we can find them easily [3][5]. If you have 10 numbers you need to remember, you can put them all in one array instead of creating 10 different storage spots [5].
How do you get something out of an array?
Each spot in the array has a number (called an index) so you can say "give me the thing in spot 1" or "give me the thing in spot 5" [1]. It's like a line of lockers where each locker has a number on it [3].
When would you use one?
You use arrays when you have a bunch of similar things you want to keep together, like a list of student names, test scores, or temperatures from each day [5].
// sources
Feb 20, 2024 ... An array is like a box, but a special box that holds a set of different "items" (information). You can use the box to pick out and use certainย ...
Oct 22, 2014 ... Arrays are not pointers, but you can index pointers as if they were arrays. Arrays also decay to pointers readily.
Mar 4, 2022 ... An array is a list of values. It could contain zero values, one value, a million values. It's like a spice rack. A string is a value.
Sep 17, 2022 ... Sometimes it is useful to go back to basics. Understanding data structures is paramount to your effective use of Make.
Aug 23, 2020 ... Arrays are the simplest form of grouping similar objects. Compared to other methods an array makes it usually more difficult to add and removeย ...
Video by Doodles and Digits | Educational Math Videos

Video by The Coding Train

Video by Neso Academy
