How I work with arrays
There are many flavours to arrays in JavaScript. The possible methods you to create or change arrays are: unshift, shift, push, pop, splice, concat, slice, destructuring, rest operators, and spread operators.
There are also looping methods like for, forEach, map, filter, reduce, find, findIndex.
17 different flavours!
I want to document how I choose the array methods I use. This should help you understand how to pick methods.
Click here to read the article!
What you’ll learn:
- How I add items to the start, middle, end of an array
- How I remove items from the start, middle, and end of an array
- How I work work with loops
- How I deal with asynchronous loops
- Why I prefer splice over slice sometimes (and apparently this is weird).
Enjoy!
Stay awesome,
Zell