ƒ
05
JavaScript Functions

JavaScript Functions

The corners of JS functions that interviews ask about and senior engineers keep using.

~ 120 min·9 lessons·updated apr 2026

What you'll learn


Lessons

Read in order. Each lesson stands on its own, but the order is deliberate.

9 lessons · ~120 min total

  1. 01
    Functions are values
    The one fact about JS functions that unlocks every fancy pattern that comes later.
    12 min
  2. 02
    Declarations vs expressions
    Three ways to make a function. Why hoisting only applies to one of them.
    13 min
  3. 03
    Parameters and arguments
    Defaults, rest, destructuring, and the legacy arguments object you can mostly ignore.
    14 min
  4. 04
    Closures
    Why a returned function still remembers the variables around it. The mechanism, not just the metaphor.
    18 min
  5. 05
    this, finally
    The four binding rules in priority order. Stop guessing what this points to.
    16 min
  6. 06
    Arrow functions
    No own this, no arguments, no new. Why that fixes callbacks and breaks methods.
    12 min
  7. 07
    Higher-order functions
    Functions that take functions, return functions, or both. Where map/filter/reduce come from.
    13 min
  8. 08
    Currying and partial application
    Two related ideas, side by side. When each is the right tool, and what bind has to do with it.
    11 min
  9. 09
    Common pitfalls
    The classic JS function bugs — the var loop trap, lost this, accidental globals, shared state.
    11 min

Prerequisites

  • · Comfortable reading JavaScript code
  • · Know what arrays and objects are
  • · Have written a small script that does something

After this, try