2 posts published under "array"

The great iterate debate: filter/map, reduce, or for?

The great iterate debate: filter/map, reduce, or for?

Intro Imagine the following, relatively common scenario: I have an array which I need to pick specific items out of and transform into a new…

Time to read: 7 minutes

Read More
For loop vs Array filter() vs Array find()

For loop vs Array filter() vs Array find()

TL;DR If ever you need to filter an array and take just the first result, use instead of . It saves some code and needless processing…

Time to read: 7 minutes

Read More