Learning path

JavaScript

The language that makes web pages interactive, from your first variable to working with the DOM.

  1. 1

    JavaScript Introduction

    What JavaScript is, what it can do in the browser and beyond, how it relates to HTML and CSS, and your first lines of code.

    4 min read
  2. 2

    Where to Put JavaScript

    Add JavaScript with script elements and external .js files, understand why placement matters, and load scripts correctly with defer.

    4 min read
  3. 3

    JavaScript Output (console.log)

    Show results with console.log and its relatives, write into the page with textContent, use alert sparingly, and debug with the browser console.

    4 min read
  4. 4

    JavaScript Variables (let and const)

    Store values in variables with let and const, learn naming rules, when to use each keyword, and why to avoid the old var.

    4 min read
  5. 5

    JavaScript Data Types

    Strings, numbers, booleans, undefined, null, objects and arrays; checking types with typeof; and how JavaScript converts between types.

    4 min read
  6. 6

    JavaScript Operators

    Arithmetic, assignment, comparison and logical operators, why to use === instead of ==, the ternary operator, and nullish coalescing.

    4 min read
  7. 7

    JavaScript Strings

    Create and combine strings, read characters, and use the essential string methods to search, slice, change case, trim, split and replace text.

    4 min read
  8. 8

    JavaScript Numbers

    Work with numbers: rounding, fixed decimals, converting from strings, NaN checks, the Math object, random numbers and formatting prices.

    4 min read
  9. 9

    JavaScript If/Else

    Make decisions with if, else if and else, combine conditions, use truthy checks, write guard clauses and avoid deeply nested code.

    4 min read
  10. 10

    JavaScript Switch

    Choose between many exact values with switch, understand break and fall-through, use default, and know when an object lookup is cleaner.

    3 min read
  11. 11

    JavaScript Loops (for, while)

    Repeat code with for, while, do...while, for...of and for...in loops, control them with break and continue, and avoid infinite loops.

    4 min read
  12. 12

    JavaScript Arrays

    Store ordered lists in arrays: create them, read and change items by index, add and remove with push, pop, shift, unshift and splice, and copy with spread.

    4 min read
  13. 13

    JavaScript Array Methods

    Transform and search data with forEach, map, filter, find, some, every and reduce, and chain them together to process lists in a few readable lines.

    5 min read
  14. 14

    JavaScript Objects

    Group related data with objects: create them, read and update properties with dot and bracket notation, loop over them, copy them, destructure them and add methods.

    4 min read
  15. 15

    JavaScript Functions

    Write reusable code with functions: declarations, parameters and arguments, return values, default and rest parameters, and functions as values.

    4 min read
  16. 16

    JavaScript Arrow Functions

    Write short functions with the arrow syntax, learn implicit returns and returning objects, and understand how arrow functions treat this differently.

    4 min read
  17. 17

    JavaScript Scope

    Global, function and block scope explained, why let and const beat var, how shadowing works, and a first look at closures.

    4 min read
  18. 18

    DOM: Selecting Elements

    What the DOM is, and how to find elements with getElementById, querySelector and querySelectorAll, loop over results, and move around the element tree.

    5 min read
  19. 19

    DOM: Changing Content

    Change text, HTML, attributes, classes and styles, create and insert new elements, remove elements, and render a list from data.

    5 min read
  20. 20

    JavaScript Events

    Respond to clicks, typing and keys with addEventListener, use the event object, prevent default actions, and handle many elements with event delegation.

    5 min read
  21. 21

    JavaScript Forms and Validation

    Read form values, handle submit, validate input with clear error messages, combine HTML validation with JavaScript, and use FormData.

    6 min read
  22. 22

    JavaScript Local Storage

    Save data in the browser with localStorage and sessionStorage, store objects with JSON, handle errors, and remember a user's theme between visits.

    5 min read
  23. 23

    JavaScript Fetch and JSON

    Load data from APIs with fetch, understand JSON and HTTP status codes, handle errors, send data with POST, and show results on the page.

    5 min read
  24. 24

    JavaScript Async/Await

    Understand asynchronous JavaScript, Promises and the event loop, then write clear async code with async/await, try/catch, and parallel requests with Promise.all.

    5 min read
  25. 25

    JavaScript Project: To-Do List App

    Build a complete to-do list app step by step with state, rendering, events, delegation, filters and localStorage, using everything from the JavaScript course.

    7 min read