JavaScript tutorial

Make your pages interactive

About this tutorial

JavaScript runs in the browser and makes pages respond to people: buttons, forms, calculations, live updates. In this beginner class you learn values, decisions, loops, functions, arrays and objects, then use them to change web pages and build a working to-do list.

Every lesson has examples you can run in the CodeLab Playground, an exercise and a short quiz. Finish with the final quiz.

Lessons

The basics

  1. Introduction to JavaScriptWhat JavaScript does, where it runs, how to add it to a page and how to see its output in the console. Free 6 min
  2. Variables and valuesStore numbers and text in variables with let and const, and name them well. Free 7 min
  3. Data types and operatorsNumbers, strings, booleans, null and undefined, and the arithmetic and comparison operators. Locked 11 min
  4. Strings and template literalsWork with text: join it, measure it, change its case and build sentences with template literals. Locked 9 min

Making decisions

  1. Conditions: if, else and logicRun different code depending on conditions with if, else if, else, logical operators and the ternary operator. Locked 12 min
  2. LoopsRepeat work with for, while and for...of loops, and stop early with break. Locked 10 min

Functions and data

  1. FunctionsGroup steps into reusable functions with parameters and return values, including arrow functions. Locked 17 min
  2. ArraysKeep lists of values in arrays: read, add, remove and search items. Locked 9 min
  3. ObjectsGroup related values with named properties, add methods, and combine objects with arrays. Locked 13 min
  4. Array methods: forEach, map, filter and findProcess lists in one line with forEach, map, filter, find and reduce. Locked 12 min

The browser

  1. The DOM: changing the pageSelect elements and change their text, styles, classes and attributes, and create new elements. Locked 11 min
  2. EventsReact to clicks, typing, hovering and key presses with addEventListener. Locked 11 min
  3. Forms and validationRead form values, stop the page reloading, check input and show helpful messages. Locked 14 min
  4. Project: a to-do list appCombine everything: DOM, events, arrays, functions and localStorage to build a working to-do list. Locked 19 min
  5. JavaScript final quizFifteen questions covering the whole JavaScript beginner class. Score yourself to finish the course. Locked 6 min
Hi there! đź‘‹ Have a question about the courses or joining the class? Ask me.