Section 1: Lab: Getting Started with Modern JavaScript
- Where JavaScript runs, and ECMAScript and its editions since ES6
- Set up VS Code and open pages with Live Server
- Use the console and debugger in Chrome DevTools
- Add JavaScript to a page with defer and type="module" scripts
- Lab: a first script that shows messages and calculates values
Section 2: Variables, Data Types, Conditions and Loops
- let and const instead of var, and block scope
- Data types, operators and template literals
- if, switch, the ternary operator, optional chaining (?.) and nullish coalescing (??)
- for, while and for...of loops
- Lab: a grade calculator and a product discount program
Section 3: Lab: ES6+ Functions
- Function declarations and arrow functions
- Default parameters and rest parameters
- Scope, closures and callbacks
- this and bind in regular functions and arrow functions
- Lab: a set of functions that format prices and dates
Section 4: Lab: Arrays, Objects, Maps and Sets
- Destructuring and spread with arrays and objects
- map, filter, reduce, find and findIndex
- Newer methods such as toSorted, findLast and Object.groupBy
- Map and Set, and converting data with JSON
- Lab: summarise sales by product category
Section 5: Lab: Classes and ES Modules
- Classes, constructors, extends, getters and setters
- Private fields (#) and static methods
- Split code into files with export and import
- Use ES modules directly in the browser, plus an overview of Vite in place of Babel and Webpack
- Lab: split shopping cart code into modules