JavaScript: free course
Make pages interactive: variables, functions, arrays, objects, loops, the DOM and events.
Start lesson 1 Open the interactive course Printable course notes
Lessons
- 1 JavaScript introduction: what it is, why we need it, who uses it and your first programs
- 2 Variables and data types
- 3 Strings, numbers and operators
- 4 Numbers, Math and dates: money, rounding, random numbers and time
- 5 Conditions: if, else, comparison, logical operators, switch and the ternary operator
- 6 Arrays and loops: storing lists of data and repeating actions
- 7 Array methods: map, filter, reduce, find and sort
- 8 Functions and objects: reusable code and structured data
- 9 Objects in depth: destructuring, spread and JSON
- 10 Scope, hoisting and closures
- 11 Errors, try/catch and debugging
- 12 The DOM and events: changing the page and responding to clicks, typing and more
- 13 Handling forms and validating input
- 14 Regular expressions: validating phone numbers, emails, KRA PINs and searching text
- 15 JSON and fetch: exchanging data with servers and APIs
- 16 Promises and async/await: handling things that take time
- 17 Saving data in the browser: localStorage, sessionStorage, cookies and IndexedDB
- 18 Classes and object-oriented JavaScript
- 19 Modules, npm and the modern JavaScript toolbox
- 20 Project: build a complete to-do list app, step by step
- 21 Project: a quiz app with score and timer