You Don't Know JS
Course Description
Learn the latest features in JavaScript with Kyle Simpson, author of the popular, You Don't Know JS, book series. You'll get up to speed with new JavaScript features like tagged template literals, destructuring, iterators, generators, regex improvements and async await.
This course and others like it are available as part of our Frontend Masters video subscription.
Preview
CloseWhat They're Saying
Doing an amazing JavaScript: The Recent Parts course from Kyle Simpson. I love how Kyle explains, the pace, the history, the context, the consequences, the future, the pragmatism or complexity, the alternatives ... BRILLIANT!!
![Carlos Saltos](https://pbs.twimg.com/profile_images/1220011932184465414/tN6G5Pbx.jpg)
Carlos Saltos
csaltos
I just completed "JavaScript: The Recent Parts" by Kyle Simpson on Frontend Masters! Never knew about iterators and generators are. So thanks for making me familiar with such an amazing feature and thanks for the amazing explanation
![Abdelrahaman Shehata](https://senjaio.b-cdn.net/public/media/499282b9-f1ba-4a0a-bc90-316b43e4382a_d3f161d9-eb58-4621-a82a-51f97b85a12b_1589592674328.jpg)
Abdelrahaman Shehata
shehata643
Learn Straight from the Experts Who Shape the Modern Web
Your Path to Senior Developer and Beyond
- 200+ In-depth courses
- 18 Learning Paths
- Industry Leading Experts
- Live Interactive Workshops
Table of Contents
Introduction
Section Duration: 22 minutes
- Kyle Simpson begins by giving context to the frustration with the fast pace of JavaScript's evolution by talking about the dark ages of JavaScript, and explaining how the language has gotten to the present day feature process.
- Kyle explains why the changes that are coming to JavaScript make the language more declarative.
- Kyle assuages developer's fears of not supporting their users when new features are implemented by introducing transpilers as a standard for the language.
- Kyle defines what the "recent parts" means as part of the title, and gives a roadmap for what the course will contain.
Strings
Section Duration: 31 minutes
- Kyle introduces a more declarative way of introducing variables to strings than the default string concatenation.
- Kyle introduces tagged literals, gives a simple example of when they could be useful, and describes where to find prewritten libraries to help in your code.
- Kyle demonstrates an application for tagged literals that logs objects in the console.
- Students are instructed to utilize both template strings, and tagged templates in a statement that is logged in the console.
- Kyle live codes the solution to the exercise.
- Kyle introduces string padding, and string trimming.
Array Destructuring
Section Duration: 47 minutes
- Kyle breaks down destructuring, and gives a tangable example of how it makes the code more declarative.
- Kyle demonstrates how to implement the previous conversation about destructuring.
- Kyle introduces the spread operator to the example, and then goes on to explain how the example without destructuring differs in behavior to the example with destructuring.
- Kyle defined the difference between declaration and assignment, and explains both in the context of destructuring.
- Kyle demonstrates how to use commas to omit a value that is returned when destructuring.
- Kyle demonstrates how to apply destructuring when the function signature contains an array, and applies the concept of gracefully falling back when what was returned is null.
- Kyle demonstrates how to to access a returned data structure's values when it is known that there are nested arrays.
Object Destructuring
Section Duration: 26 minutes
- Kyle demonstrates how to assign default parameters, and utilize the spread operator.
- Kyle explains how JavaScript distiguishes blocks from destructuring when assignment is separate from declaration.
- Kyle demonstrates how to ensure object destructuring falls back gracefully when the values are null.
- Kyle demonstrates how to access a returned data structure's values when it is known that there are objects.
- A question is asked about the proper way to give a default assignment.
- Kyle demonstrates how to apply destructuring when the function signature contains an object.
- Kyle demonstrates how to access a returned data structure's values when it is known that there are both objects and arrrays.
Further Destructuring
Section Duration: 13 minutes
- Kyle demonstrates a method of improving the readability of code by naming arguments.
- Kyle introduces a method to mix methods at a call site.
- Students are instructed to destructure an AJAX response, then restructure the parameters.
- Kyle live codes the solution to the exercise.
Array Methods
Section Duration: 13 minutes
- Kyle introduces new array methods .find, findIndex, and .includes that search an array.
- Kyle introduces new array methods .flat and .flatmap that augment nested arrays.
Iterators & Generators
Section Duration: 31 minutes
- Kyle defines what an iterator is, and walks through an example where an iterator is instantialized, and an iterator result is produced.
- Kyle introduces the new built in key word "of" and spread operator as declarative methods to iterate over data structures.
- Kyle discusses the issues that arise when attempting to iterate over data structures such as an object, and demonstrates a strategy for overcoming this.
- Kyle demonstrates how to use generators to iterate over data structures without iterable attributes.
- Students are instructed to implement an iterator and generator to log lucky numbers.
- Kyle live codes the solution to the exercise.
Regular Expressions
Section Duration: 22 minutes
- Kyle first reviews look aheads, then introduces the brand-new implementation of look behinds.
- Kyle introduces a method to organize regular expressions and make them more human readable.
- Kyle demonstrates how to utilize the dotall mode to select elements of a string.
- Students are instructed to utilize all three of the features learned in the last few sections, as well as earlier lessons to log selected portions of a poem provided by Kyle.
- Kyle live codes the solution to the exercise.
Async Await
Section Duration: 39 minutes
- Kyle gives context to what was done previous to the availability of the sync-async pattern, then goes on to explain how the async function accomplishes essentially what the async function accomplished.
- Students are instructed to construct an async function where files are given to the function by a mock AJAX call, and are logged in the order that they are received.
- Kyle live codes the solution to the exercise, and demonstrates a common mistake that students are likely to make.
- Kyle goes into further detail on why await cannot be used in a regular function, and offers up a library that fills the gap in the language.
- Kyle exposes the issues with async functions, including that it only accepts true promises, and a scheduling issue that causes starvation.
- Kyle introduces a new function type as of ES2018 that allows for yield and await in the same function.
- Kyle explains why async generators are the last piece in the quadrant of async generators.
Wrap-Up
Section Duration: 1 minute
- Kyle explains why the audience should be encouraged by the future of JavaScript.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops