ƒ
05
JavaScript Functions

JavaScript Functions

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

~ 120 min·9 lessons·updated feb 2026

What you'll learn


Lessons

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

  1. 01
    Functions are values
    First-class, plain and simple — and what that buys you.
    12 min
  2. 02
    Declarations vs expressions
    Hoisting, named expressions, and what 'this' has to do with it.
    13 min
  3. 03
    Parameters and arguments
    Defaults, rest, destructuring — modern function signatures.
    14 min
  4. 04
    Closures
    Why a returned function still 'remembers' its surroundings.
    18 min
  5. 05
    this, finally
    The four binding rules, in order. No more guessing.
    16 min
  6. 06
    Arrow functions
    What they aren't (it's not just shorter syntax).
    12 min
  7. 07
    Higher-order functions
    Functions that take or return functions, and why you already use them.
    13 min
  8. 08
    Currying and partial application
    Two ideas, often confused, both useful.
    11 min
  9. 09
    Common pitfalls
    Loops + closures, lost 'this', accidental globals.
    11 min

Prerequisites

  • · Read JavaScript code without a dictionary
  • · Comfortable with arrays and objects

After this, try