
The Hard Parts of Asynchronous JavaScript
Learning Paths:
Topics:
Table of Contents
Introduction
Introduction
Will Sentance introduces himself, reviews the top five capacities that companies look for in programming candidates, and expectations for students working through the course.JavaScript Code Execution
To ensure a proper and shared foundation for upcoming lessons, Will reviews code to understand what happens when JavaScript executes or runs.
Asynchronous JavaScript
Introducing Asynchronicity
Will introduces asynchronicity, which is the backbone of modern web development in JavaScript, and illustrates that features such as asynchronicity reside outside pure JavaScript.Asynchronous Web Browser APIs
To utilize asynchronicity in JavaScript development, Will discusses Web Browser APIs that allow JavaScript to interface with other technologies provided by the browser.Asynchronous Web Browser APIs Q&A
Through answering a question from a student about executing a function on a call stack while waiting for a response on an asynchronous function, Will introduces the need for rules when JavaScript interacts with Browser APIs.Calling the Outside World
Will shows how code designated for deferred functionality is only allowed back into JavaScript when certain conditions are checked by the Event Loop: If the Callback Queue contains code, that code is can enter the Call Stack only when the Call Stack itself is empty and the global execution context has run all of its code.Calling the Outside World Q&A
Will answers questions from students about where Callback Queue is stored, how do calls to Browser APIs get handled if they are executed at the same time, size limit to the Callback Queue, and more.Wrapping Up Web Browser APIs
Will reinforces the knowledge of how deferred functionality in Browser APIs works.Asynchronous Exercises
After Will introduces pair programming and its importance to becoming a better, well-rounded engineer, students work in pairs to solve a series of JavaScript challenges.
Promises
Introducing Promises
After reviewing deferred functionality, Will introduces Promises, which act as a placeholder for the data that is hoped to get back from the web browser feature's background work.Promises
Will illustrates how Promises work to create a two-pronged façade functions that both initiate background web browser work and return a placeholder object immediately within JavaScript.Promises Q&A
Will answers questions from students about event loops role with Promises, promises and allocated memory, the ability to add or modify const, and more.Promises & Microtask Queue
While illustrating another example of Promises working with JavaScript and Web Browser features, Will introduces the Microtask Queue (or Job Queue). Overseen through the Event Loop, the Microtask Queue is where tasks initiated by promise objects get processed before callback queue.Microtask Queue Q&A
Will answers questions from students about browser methods and queues, the priority of code being processed through event loop, and more.Wrapping Up Promises
Will reviews the benefits and problems of Promises.
Iterators
Return Function Inside a Function
After Will reviews iterators as a way to automate the accessing each element and be able to focus on what to do for each element, he illustrates how to functions can be returned from other functions with JavaScript.Return Next Element with a Function
Will demonstrates how to create a function that holds both an array, the position current within a 'stream' of elements, and the ability to return the next element in the array.Iterator Function
Will examines the building blocks of iterators and their ability to turn data into "streams" of actual values that can be accessed one after another.Iterators Exercise
Students work to code their own iterators as well as interacting with JavaScript's built-in iterators.
Generators
Generators
Will introduces the concept of native JavaScript generators by walking through a reconstruction using arrays based on previous lessons.Generator Functions with Dynamic Data
Will explores the function* declaration, which defines a generator function that allows for dynamically setting data flows.Generators Q&A
Will answers students' questions about what generators are patterned after, generator objects properties, infinite loops through generators, and more.Introducing Async Generators
After reviewing generators, Will introduces the concept of asychronous generators.Async Generators
Will walks through an example asynchronous generators to showcase control over deferred functionality.Async Generators Q&A
Will answers students questions about asynchronous generators.
Final
Async Await
Will demonstrates async await, which helps to simplify the ability of generators.Wrapping Up
Wrapping up "JavaScript: The New Hard Parts", Will reviews material covered in the course, congratulates the students for completing the course and urges students to improve their technical communication.