← Courses

LANG JS2 · 3 credits

Course Outline

Advanced JavaScript

The interview JavaScript course. You can write JavaScript. Now learn how it actually works. Closures, this, prototypes, the event loop, promises, async/await, generators, modules, regex, and the classic gotchas interviewers love to ask about.

What you will learn

  • Explain closures precisely and use them for private state and the module pattern
  • Determine what this refers to in any call, and control it with call, apply, and bind
  • Walk the prototype chain and explain what class syntax really does
  • Predict output ordering using the call stack, task queue, and microtask queue
  • Create, chain, and error-handle promises, then rewrite them with async/await
  • Run async work in parallel with Promise.all and know when to run it sequentially
  • Use iterators, generators, destructuring, spread/rest, and optional chaining fluently
  • Read and write practical regular expressions with groups and replace
  • Answer classic interview trick questions on hoisting, equality, and references

Course outline

Unit 1Closures for real

  • 1-1Scope: what a function can see4 checks · 10 min
  • 1-2Closures: functions that remember5 checks · 12 min
  • 1-3Private state and the module pattern5 checks · 12 min

Unit 2this, call, apply, bind

  • 2-1What is this, really?6 checks · 14 min
  • 2-2call, apply, bind: choosing this yourself5 checks · 12 min

Unit 3Prototypes and classes

  • 3-1The prototype chain5 checks · 12 min
  • 3-2class syntax: what it really does4 checks · 12 min
  • 3-3Inheritance: extends and super4 checks · 11 min

Unit 4The event loop

  • 4-1The call stack and the task queue5 checks · 12 min
  • 4-2Microtasks: promises jump the line4 checks · 12 min

Unit 5Callbacks to promises

  • 5-1From callbacks to promises5 checks · 11 min
  • 5-2Chaining: then returns a new promise5 checks · 11 min
  • 5-3Error flows: catch and finally4 checks · 12 min

Unit 6async/await mastery

  • 6-1async/await basics5 checks · 12 min
  • 6-2Sequential vs parallel: Promise.all4 checks · 13 min
  • 6-3Async patterns you will use at work4 checks · 12 min

Unit 7Iterators, generators and symbols

  • 7-1Iterables: how for...of really works5 checks · 11 min
  • 7-2Generators: pausable functions4 checks · 11 min
  • 7-3Symbols: keys that cannot collide3 checks · 10 min

Unit 8Modules and modern syntax

  • 8-1Destructuring5 checks · 11 min
  • 8-2Spread, rest, ?. and ??5 checks · 11 min
  • 8-3import and export3 checks · 8 min

Unit 9Regex in JavaScript

  • 9-1Regex basics: test, classes, quantifiers5 checks · 14 min
  • 9-2Groups, match, and replace4 checks · 11 min

Unit 10Interview gotchas capstone

  • 10-1Hoisting and the temporal dead zone5 checks · 11 min
  • 10-2Equality and coercion4 checks · 12 min
  • 10-3Copies vs references, and the final gauntlet4 checks · 12 min

Practice while you learn

Use Hack University's public online code editor when you want to run code online before committing to the full curriculum. The browser compilers are free for quick syntax checks, exercises, and interview practice in an isolated sandbox environment.