Day 10: Higher Order Functions Part 1
Lesson 5: find
Filter will give you an array of items that match your condition, but what if you just want a single item?
That's where find()
comes in, it will return the first item in the array that matches your condition, if an item can't be found it will return undefined
.