3 posts published under "javascript"

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
This week I learned how to mock a Render Props Component in React.

This week I learned how to mock a Render Props Component in React.

Intro So this little article, as the title says, is about how you might mock Render Props for your test suites, especially if you run across…

Time to read: 6 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