JavaScriptIntermediate
JavaScript Closures Explained: How Functions Remember
What a closure really is, how a JavaScript function keeps its variables after the outer function returns, and the patterns and bugs closures cause.
The language of the web: async code, the DOM, and modern syntax.
3 articles
What a closure really is, how a JavaScript function keeps its variables after the outer function returns, and the patterns and bugs closures cause.
Why does a resolved promise always beat setTimeout(fn, 0)? Learn exactly how the event loop schedules tasks, microtasks and repaints, and how to keep long work from freezing the page.
A practical guide to promises and async/await: how they work, how to handle errors, and how to run tasks in parallel without slowing your app down.