Beginner’s guide to JS

Updated Jun 2026

You’ve already written HTML that structures a page and CSS that makes it look good. But so far, your pages just sit there. They don’t respond, they don’t remember anything, and they can’t make decisions.

That’s where JavaScript comes in.

JavaScript is the language that makes web pages behave. It’s what runs when you click a button and something happens, when a form tells you a field is missing, when a countdown timer ticks, or when content loads without the page refreshing. Every interactive thing you’ve ever experienced on the web was almost certainly powered by JavaScript.

It’s also one of the most beginner-friendly programming languages to start with — you don’t need to install anything, and you can run it directly in the browser you already have open.

In this module, you’ll go from zero to writing real, working JavaScript. You’ll learn how programs store and manipulate information, how to make decisions in code, and how to make your pages respond to what a user does.

By the end, you won’t just understand what JavaScript is — you’ll have written some yourself.

Units in this module

  1. 1. What is JavaScript & how browsers run it
  2. 2. Variables & data types (let, const, strings, numbers, booleans)
  3. 3. Operators & expressions (arithmetic, comparison, logical)
  4. 4. Comments in JS
  5. 5. Conditionals (if, else if, else, switch)
  6. 6. Loops (for, while, for...of)
  7. 7. Writing & calling functions
  8. 8. Parameters, arguments & return values
  9. 9. Arrow functions
  10. 10. Arrays — creating, accessing, and looping
  11. 11. Objects — key-value pairs and dot notation
  12. 12. Array methods (map, filter, forEach)
  13. 13. The DOM — what it is and how JS reads it
  14. 14. Selecting & manipulating HTML elements
  15. 15. Events — clicks, inputs, and listeners
  16. 16. Forms & user input with JS
  17. 17. setTimeout & setInterval — timing
  18. 18. Working with JSON
  19. 19. Fetch API — loading data from the web
  20. 20. Debugging — console, errors, and DevTools