
Explore how JavaScript works under the hood, delving into execution contexts, closures, and ES6 and beyond features like block scoping, let and const, classes, arrow functions, symbols, iterators, and generators.
Set up your JavaScript environment in Visual Studio Code, create an HTML5 index and an app.js, and run locally with Live Server to see console logs in the browser.
Explore block scoping in JavaScript, defining variable scope by blocks and curly braces to reduce bugs, contrast with var hoisting, and deepen understanding of how engines execute code.
Explore how block statements create lexical environments inside an execution context and how var differs from let and const for block-scoped variables.
Explore how let and const create block-scoped lexical environments, how hoisting and initialization differ from var, and how curly braces and blocks govern variable access and scope.
Explain bindings as the connection between a variable name and a memory location that holds a value, clarified through the assignment operator.
Explore how const creates a block-scoped binding and enforces immutability of the binding, while the value can still change for objects.
Explain templates as features that ease string handling, reducing the need for managing spaces, plus signs, and escapes when composing strings like a greet function with first and last names.
Explore whitespace characters: spaces, tabs, and new lines, in strings, and preview the upcoming multi-line strings feature.
Explore multi-line strings in JavaScript with template literals. Learn how backticks create template strings that include new line characters and simplify building strings from first and last names.
Explore how interpolation replaces parts of strings with placeholders using template literals in JavaScript. Learn how dollar signs, curly braces, and tagged templates enable dynamic expressions and custom string logic.
Explore why JavaScript uses classes as a familiar way to create objects and navigate the prototype chain, while recognizing JavaScript as a prototype language and ES6 enhancements.
Explain how JavaScript classes create objects via the prototype chain, not new types, and reveal that they are syntactic sugar—essentially functions under the hood.
Explore how JavaScript classes are syntactic sugar for function objects, using declarations and expressions, including anonymous classes assigned to variables.
Explore what an instance means in JavaScript, describing how objects created with the class syntax become instances of that creation feature, and how multiple instances share the same structure.
Explore public instance fields in JavaScript classes and how each object gets its own fields. Access fields with the dot operator and relate fields to properties within class syntax.
The constructor initializes instance fields when creating a new object with the new keyword, using this to assign values, and the class prototype links all instances to the person prototype.
Explore how class syntax adds methods to the prototype instead of every object, using a constructor and fields like firstName, and a greet method for instances.
Explore how the class syntax extends the prototype chain to create a longer chain, as Tony extends person and adds its methods. See prototype relationships linking classes and built-in types.
Explore how extends creates the prototype chain and how super traverses it to access base constructors and the greet method.
Explain how public static fields and methods attach to the class function object, not to instances or prototypes, and how a static residence field encapsulates class-level logic.
Explore private fields in JavaScript using the hash prefix within a class, and how getters and setters control access and updates to those fields to prevent unintended changes.
Explore private methods in JavaScript by using the # syntax to restrict access within a class and its prototype chain, improving code organization and preventing bugs.
Explore why arrow functions offer a terse way to write functions, leveraging first-class functions and simplifying higher-order programming, while noting this keyword differences, downsides, and ways to avoid confusion.
Explore the mathematical roots of arrow functions, and show how function notation and input and output concepts translate to JavaScript syntax and ES6 practices.
Master JavaScript arrow function syntax and how the engine treats arrow function expressions. Convert function expressions to concise, anonymous arrows and explore immediately invoked arrow function expressions.
Arrow functions bind this to the outer context, so inner arrow functions reuse the outer this and avoid the self-equals-this pattern.
Explore arrow function expressions and their syntactic sugar for returning values. Learn how single-line bodies remove braces and the return keyword, and how a single parameter lets you drop parentheses.
Explore how arrow function expressions lack a this keyword and how terse syntax can hurt readability, and examine memory implications of per-object methods versus prototype sharing.
Understand how symbols introduce a new primitive type in JavaScript to reduce collisions and fragile code when overriding methods from third-party libraries.
Discover how symbols create unique values to prevent property collisions, use bracket notation for symbol keys, and leverage the global symbol registry to share descriptions across code.
Explore well known symbols, built into the JavaScript engine and available for use, ensuring unique properties or methods that the engine relies on and you can't accidentally override.
Explore why iterators and iterables matter in JavaScript, showing how ES6 and beyond let you design custom objects that can be looped like arrays by tapping into the engine’s abilities.
Explore iteration as a core programming concept, looping over arrays with for and while loops, and preview ES6 and beyond techniques for iterating over data.
Explore how for...in and for...of differ in JavaScript: for...in iterates enumerable property keys across an object and its prototypes, while for...of iterates over values of an iterable.
Explore how the iteration protocol enables the JavaScript engine to loop over objects. Create a get iterator with a next method returning value and done, advancing from start to end.
Learn to make objects iterable by implementing symbol.iterator that returns an iterator conforming to the iteration protocol. Understand next, value, and done, and how for-of loops consume the sequence.
Discover how symbol properties and methods influence iteration, reveal which properties appear in loops, and how well-known symbols like the iterator enable iterable objects for flexible, concise JavaScript code.
Explore default parameters in JavaScript, learning how default values simplify function calls when arguments are missing, and examine the quirks introduced with this ES6 feature.
Explore default parameters in JavaScript ES6 and beyond using a greet function to show how undefined triggers default values, while null does not and explicit undefined still uses the default.
Understand default parameters in JavaScript by enhancing the greet function with a default phrase function that uses first name and last name, illustrating how parameter order and scope affect execution.
Explore rest and spread syntax to simplify iterating over iterables, whether created or existing, and learn how this operator makes code clearer and faster to write in JavaScript.
Explore rest parameters in JavaScript, showing how the dot dot dot operator collects indeterminate function arguments into a real array, enabling flexible, iterable input handling.
Explore the rest and spread operator with arrays, copying arrays and building combined ones. See how spread iterates over values to produce cleaner, faster code.
Leverage the spread operator to spread any iterable, including custom iterables and strings, into individual values for arrays or outputs.
Learn how to copy and merge objects in JavaScript using the spread operator with object literals, and understand how property order affects overwriting.
Use object composition to build new objects by merging properties from multiple sources with the spread operator, creating a single, easily updatable object instead of relying on inheritance.
Explore immutability in JavaScript by using spread to copy objects, ensuring the original data remains unchanged when passed to functions, including handling nested properties.
JavaScript is the language of the internet. Learning it has allowed many front and backend web developers to get jobs. Yet JavaScript’s newest features can be confusing and hard to understand.
Nearly 200,000 students have learned from my course "JavaScript: Understanding the Weird Parts" which so many tell me formed the foundation of their careers today, and they still review yearly. This is the sequel, continuing your JavaScript education and diving into even more advanced concepts, under-the-hood!
In this course you will learn to deeply understand how modern advanced JavaScript language features work under-the-hood, such as:
Block Scoping (let and const)
Templates
Classes
Arrow Functions
Symbols
Iterators and Iterables
Default Parameters
Rest and Spread
ES6 and beyond refers to features added to the JavaScript language in ES6 and ES Next. These features often will make your coding life easier, and are used by modern JavaScript frameworks, like React, Vue, Angular, and more.
As always, these topics will be covered with the focus on my core philosophy: "Don't Imitate, Understand". You won't try to learn by imitating the code I'm writing, but rather by deeply understanding how these language features work inside JavaScript engines. Deeply understanding means you will not only write better code, but also find it much easier to debug problems.
This course’s goal, then, is to help you have a deep understanding of JavaScript’s newest features. Through analysis of the inner working of the JavaScript engine, you can write code more confidentially and fix problems others find difficult.
It’s time for you to deeply understand advanced JavaScript concepts!
Happy coding!
- Tony Alicea