An Array is a data structure, possibly the most fundamental one!
"Okay, but what is a data structure?"
Short answer: It is just a structure where you can organize, modify, access, store, and retrieve data. And Data, my friends, is essential to what we do!
There are MANY data structures, several are built-in into Javascript, many others have to be custom-made (and guess what, you need arrays to do so!)
Alright, enough, you get the idea and understand the importance.
If data structures are so important in programming, and an Array is the most fundamental one... Don't you agree that it would be helpful, even unavoidable, to learn the many Array Methods that JavaScript offers out of the box?
The problem:
I struggled with this concept when I was starting and it took me a while to understand them because:
Thinking about imaginary data when you are learning is too abstract and boring.
I just learn them conceptually. Too much theory, and not enough practice.
The Solution:
How did I solve these issues?
- I related these Array methods to stuff that I did understand. It was suddenly not abstract anymore
If you know me, you know I LOVE food. So I prepared this little snippet relating food to some of the most used Array Methods:
- I practiced and actually tried out the methods.
A great tutorial to follow and code along is Florin Pop's Array Methods Playlist :
Here is the first video of the playlist:
Hopefully, you can make the most out of these methods and make a big leap in your Development Career!