Array Methods: Find VS Filter

Jay Wen
1 min readOct 31, 2022

Find and filter are a couple of the common array methods used and there are slight differences between the two.

The “find” method returns the first item that it finds.

The “filter” method returns all the items that meet the requirement.

Below we will use this example of an array of objects called “pups”.

const pups = [
{
"name": "Mr. Bonkers",
"isGoodDog": false
},
{
"name": "Nugget",
"isGoodDog": false
},
{
"name": "Skittles",
"isGoodDog": false…

--

--

Jay Wen

Hey! I’m a full stack software engineer. Here’s where I document my technical learning and any tips/skills I can share as I continue to learn. :)