CodeOath
← All posts
JavaScript75 min total · 15 parts

JavaScript Core Concepts: Scope, Closures, `this`, and the Event Loop

Contents — Part 1 of 15: Overview
Part 1 of 15 · ~1 min

Overview

Most confusing JavaScript behavior traces back to a small set of mechanisms: how scope and hoisting work, what a closure actually captures, how this gets bound, how the call stack unwinds, and how the event loop orders asynchronous code. This is a complete reference for all of them together, since they constantly interact in real code — work through it in order, or jump straight to the section you need from the sidebar.