#scope
Functions
Functions are the building blocks of JavaScript programs. They let you wrap up a piece of logic, give it a name, and reuse it whenever you need it. In the Introduction to JavaScript, we wrote a few simple functions. This tutorial goes much deeper — we’ll cover how JavaScript handles scope, what closures are, and how to use functions as values (higher-order functions). Function Declarations vs Expressions There are two main ways to define a function. Read more →
April 14, 2026