Everwhy Open Everwhy
Computing

What would it take to make a web page react when you click it?

JavaScript 101 · about 12 minutes a level

Learn JavaScript, the language that makes web pages interactive, from your first console.log() to your first interactive page. You'll work with strings, numbers and variables, make decisions, repeat work with loops, organise data in arrays and objects, write functions, and finally use JavaScript to change a web page and respond to clicks.

Open in Everwhy Continue on the web

Go deeper, level by level

  1. First lines: Your first JavaScript: console.log and strings, let, const and numbers: storing values, Decisions with if, and why === beats ==
  2. Values and types: Types and typeof: numbers, strings, Booleans, undefined and null, Working with strings: length, indexes and methods, Numbers in practice: conversion, NaN and rounding
  3. Decisions in depth: Combining conditions: &&, || and !, Truthy and falsy values, switch and the ternary operator
  4. Loops: Repeating with while, Counting with for loops, Totals, counters and break
  5. Arrays: Arrays: lists of values, Looping over arrays with for...of, Array methods: map, filter and join
  6. Functions: Writing and calling functions, Parameters and return values, Arrow functions and scope
  7. Objects: Objects: values with names, Arrays of objects, JSON: data as text
  8. The web page and events: The page as a tree: the DOM, Changing text and style with JavaScript, Responding to clicks and typing: events, Mini project: a tip calculator page

Every lesson shows its sources and how sure we are, and is checked by Everwhy.