30 Days Of JavaScript

Day 10: Higher Order Functions Part 1

Lesson 0: Intro

We've spent some time looking at arrays (a lot) of time looking at functions. Now it's time to combine the two and really show you some magic.

Today we will look at some special functions that exist on arrays, they will allow you to process array data in creative and efficient ways. We will look at the following higher order functions:

  1. forEach
  2. sort
  3. map
  4. filter
  5. find
  6. findIndex
  7. some
  8. every
  9. reduce
  10. reduceRight

Some of these words will look familiar to you, like filter and find, but others might sound very odd, like map and reduce.

Your head might be spinning by the end of today but that's ok, this is conceptually quite a challenging part of the language but it's also one of the most power and satisfying aspects to use.

Let's take a look at forEach and use that as the proving ground for explaining the concept to you.

Outline

Go Pro?

If you upgraded to pro, sign in here

  • About
  • Blog
  • Privacy
Looking to email me? You can get me on my first name at allthecode.co