O'Reilly logo
live online training icon Live Online training

Advanced JavaScript

Prototypes, closures, promises, async/await, IIFEs, and many other concepts holding you back

Topic: Web & Mobile
Sahil Khosla

You have completed many tutorials on JavaScript and have been using it for a while, whether for work or personal projects. But, you still feel that your core JavaScript knowledge is limited and it is holding you back. You are uncomfortable whenever you come across code that uses apply/call/bind, prototypes, closures, promises, async/await, IIFEs, etc.

This training focuses on many such concepts, which are often not covered in intro tutorials but which are essential to becoming an expert JavaScript developer.

What you'll learn-and how you can apply it

  • Write elegant JS code with ES6 syntax for use in web apps, node backend, or lambdas.
  • Learn several approaches to writing asynchronous JavaScript that can be leveraged to call APIs or long running functions without freezing the app.
  • Advanced concepts such as promises, async/await, apply/call/bind and frequently used design patterns for writing performant, bug-free, and maintainable code.

This training course is for you because...

  • You already have an understanding of JavaScript basics with some practical experience.
  • You want absolute clarity on advanced vanilla JavaScript concepts so you can focus on learning modern web frameworks without getting lost.
  • You want to develop and publish your own open-source JavaScript libraries.


Basic understanding of JavaScript and experience using it for developing web applications

Course Set-up

  • If you would like to follow along in real-time, have your favorite IDE, browser, and terminal running.
  • Alternatively, you can take notes during the session and try the examples at a later time (a link to the code and slides will be posted).

Recommended Preparation

Recommended Follow-up

Eloquent JavaScript -


About your instructor

  • Sahil is a Software Engineer with 10+ years of experience in developing user facing apps and websites. He is currently part of the front-end team at OANDA and has previously worked at Expedia where he was part of the group responsible for revamping the mobile web experience. A multipotentialite at heart, Sahil loves to learn and equally loves to share that knowledge with others. He takes pride in breaking down complicated concepts and making them easy to understand with analogies and diagrams.


The timeframes are only estimates and may vary according to how the class is progressing

Segment 1: Overview Length (5 min)

  • Instructor will give an overview of the training and the topics covered

Segment 2: Objects, Hoisting and Execution Length (20 min)

  • An object in JavaScript
  • What’s provided in the box
  • Execution Context
  • Hoisting and Executing
  • Execution Stack
  • Variable Environments
  • Scope Chain

Segment 3: Functions and IIFEs Length (20 min)

  • What are functions?
  • Difference between objects and functions
  • Different ways to create a function
  • IIFEs and their execution context

Segment 4: Closure, Apply/Call/Bind Length (20 min)

  • How is ‘this’ decided
  • Understand closure in JavaScript
  • How IIFEs come to the rescue
  • Using Apply, Call & Bind

Break: 5 min

Segment 5: ES6 Syntax Refresher Length (30 min)

  • Const/Let
  • Template Strings
  • Object Literals
  • Arrow Functions
  • Default Params
  • Spread Syntax
  • Destructuring
  • ES6 Array Methods

Segment 6: Classes & Inheritance Length (20 min)

  • Difference between a function and an object
  • Classes old way vs. new (much easier) way
  • Inheritance and why bother

Segment 7: Design Patterns Length (15 min)

  • Module
  • Revealing Module Pattern
  • Singleton

Break: 5 min

Segment 8: Async Programming Length (20 min)

  • JavaScript Event Loop
  • Callbacks - how they work and when they start to get messy
  • Promises to the rescue - reject/resolve, chaining, promise.all and error handling
  • Async/Await - not just syntactic sugar
  • How to pick one between callbacks, promises and async/await