Grokking Advanced JavaScript
Learn how JavaScript really works: error handling, regular expressions, prototypes and classes, the event loop, promises, async and await, and this.

Course Overview
Many developers can write JavaScript that works without being able to explain why it works. A promise handler runs before a timer that was set first, a method loses its this when it is passed as a callback, and a class turns out to be a function with a prototype. This course explains those behaviors, so you can predict what code will do before you run it. It assumes you already know variables, functions, arrays, objects, and loops. You begin with error handling, so that one bad input does not stop a whole program, and with regular expressions for checking and searching text. The course then explains how objects share behavior through prototypes, and builds from there to classes, private fields, inheritance, and mixins. The asynchronous chapters show how the event loop orders work, and teach callbacks, promises, and async and await on one running example. The last chapter covers this, hoisting, currying, BigInt, and the mistakes that most often produce wrong results without an error. Most lessons contain code you can run and change in the lesson, diagrams follow each mechanism step by step, and every chapter ends with an assessment that explains each answer.
What you'll learn in Grokking Advanced JavaScript
- Tell syntax errors, runtime errors, and logical errors apart, and know which of them a program can catch.
- Throw your own errors with clear messages, and choose the right built-in error type for each problem.
- Explain how a property lookup moves along the prototype chain, and what the new keyword does step by step.
- Build class hierarchies with extends and super, override methods, and share behavior across unrelated classes with mixins.
- Write asynchronous code with callbacks, promises, promise chains, and async and await, and handle errors at each step.
- Predict what this refers to in every kind of call, and set it with call, apply, and bind.
- Explain hoisting and the temporal dead zone, avoid common JavaScript mistakes, and check your understanding with an assessment at the end of every chapter.
- Use try, catch, and finally so that one bad input does not stop a whole program, and so that cleanup code always runs.
- Read and write regular expressions, and use test, exec, match, matchAll, and replace to validate, search, and change text.
- Write classes with constructors, methods, static members, getters and setters, and private fields.
- Explain why asynchronous code does not finish in the order it is written, using the call stack, the task queue, and the microtask queue.
- Run independent asynchronous steps at the same time with Promise.all, and loop over values that arrive over time with for await.
- Use destructuring, rest parameters, BigInt, the nullish coalescing and optional chaining operators, currying, and self-invoking functions.
Course Content
Asynchronous JavaScript
Promises and Async/Await
What people say about our courses






About the Author

Arslan Ahmad
Industry Expertise & Leadership
Arslan Ahmad is the lead author of Grokking Advanced JavaScript. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.
He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.
The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.
500+
Interviews Conducted
10k+
Students Taught
Related Courses
$197
$48
$48
FAQs
What is Grokking Advanced JavaScript?
It is a course on the parts of JavaScript that larger programs depend on: error handling, regular expressions, prototypes and classes, asynchronous code with callbacks, promises, and async and await, and a set of features such as this, hoisting, destructuring, BigInt, and currying.
Who is this course for?
It is for developers who can already write small JavaScript programs and now want to understand how the language really works. That includes people who finished a JavaScript fundamentals course, and front-end or back-end developers who use JavaScript at work and read code they do not fully understand.
What do I need to know before I start?
You should be comfortable with variables declared with let and const, if statements, loops, functions, arrays, and objects, and you should be able to read the output of console.log. You do not need experience with Node.js, a framework, or the browser DOM.
Can I run the code in the lessons?
Yes. Most lessons contain runnable examples that you can edit and run in the lesson itself, and each one prints its result with console.log. The output shown in the lessons was produced by running the same code.
Are there quizzes or assessments?
Yes. Each of the six chapters ends with an assessment of multiple-choice questions, and each attempt draws half of the chapter questions. Most questions show a few lines of code and ask what they print or why they fail, and every option comes with an explanation.
Does the course explain the event loop?
Yes. The asynchronous chapters show how the call stack, the task queue, and the microtask queue decide the order in which code runs, and why a promise handler runs before a timer that was set first. Diagrams follow each example step by step.
Does the course teach promises and async and await?
Yes. It starts with callbacks and their problems, then teaches how to create a promise, connect promises in a chain, handle a rejection, write the same logic with async and await, run independent steps at the same time with Promise.all, and loop over values that arrive over time with for await.
Does the course cover object-oriented JavaScript?
Yes. It explains prototypes first, because classes are built on them, then covers constructor functions, classes, getters and setters, private fields, inheritance, abstraction, polymorphism, and mixins, with diagrams of where each property and method is stored.
Is this course about the browser or about Node.js?
Neither in particular. The course teaches the JavaScript language itself, which is the same in the browser and in Node.js. The examples run as plain JavaScript and do not depend on a web page, a framework, or a server.
What does the course not cover?
It does not teach modules with import and export, the browser DOM, TypeScript, or frameworks such as React. It teaches the language features that all of those depend on.
