Making Sense of JavaScript Array Methods

The most common array methods we use are .map(), .filter(), .forEach(), and .sort(). Maybe you’ve also come across .split() and a few others. But with so many methods available, it’s easy to forget when to use what.

So instead of listing them all, let’s categorize them by functionality:

✔ Modifying Arrays –

🔹.push() 🔹.pop() 🔹.shift() 🔹.unshift() 🔹.splice() 🔹 .fill() 🔹.copyWithin()

✔ Iterating & Transforming

🔹.map() 🔹.forEach() 🔹.filter() 🔹.reduce() 🔹.flat() 🔹.flatMap()

✔ Searching & Checking

🔹.find() 🔹.findIndex()
🔹.some() 🔹.every()
🔹.includes() 🔹.indexOf()

✔ Sorting & Reversing

🔹.sort() 🔹.reverse()

✔ Extracting & Joining

🔹.slice() 🔹.concat() 🔹.join() 🔹.toString()

You don’t need to memorize them all. Just knowing they exist is enough—so when the time comes, you can search for the right tool and use it effectively.

I hope you find it helpful! 💯💯