Helpful Array Methods Series: Part.2- The Filter Method

Elle D
1 min readJan 29, 2021

Hey all! As promised, here is the second article/vlog covering how to solve a common algorithm using different methods. Todays’ method will be the filter() method.

The problem we are trying to solve is how to take a 2D Array and find how many times a certain number appears(if it exists). At first, this problem can seem a bit confusing. It was for me as I didn’t know what a 2D Array was! But, our good friend Google who is reliable and knows all (….well ALMOST all) gave me the answer.

In case you missed it, here is the link to my first video where I talk about what exactly a 2D Array is and how to use the flat() method.

So without further ado, Here is the video where we finish solving the problem and discuss the filter() method.

Hopefully, these last two videos were helpful. Look out for more algorithm challenges and helpful methods in the very near future. (Probably next week just FYI)…Happy Coding Ya’ll. 😜

--

--