Laroo-Pece Division, Gulu City, Northern Uganda
Uganda time
Web development - Intermediate

JavaScript for Beginners: Make Web Pages Interactive

Learn JavaScript from the first line: variables, decisions, loops, functions, the DOM and events. Build a to-do list, tip calculator, quiz and tabs, then learn debugging and fetch.

About this course

HTML gives a web page its structure and CSS gives it style. JavaScript gives it behaviour: menus that open, forms that check what you typed, lists that update without reloading the page. It is the programming language that every web browser understands, so anything you build with it can run on any phone or computer with no extra software.

This course takes you step by step from your first line of code to small, working features. You will learn the core ideas of the language, then use them to change a real page: select elements, react to clicks, validate forms and save data in the browser. You will also learn how to find and fix mistakes, which is a large part of every developer's day.

You should already be able to write a simple web page with HTML and CSS. No programming experience is needed. Type every example yourself, run it, and change it to see what happens: that is how programming is learned.

What you will learn

  • Explain what JavaScript does in the browser and run code in the console and from a script file.
  • Store and combine data with variables, data types, operators and template strings.
  • Make programs decide and repeat with if, switch, for and while.
  • Write functions, including arrow functions, and explain scope.
  • Work with arrays and objects using map, filter, forEach and find.
  • Select and change page elements with the DOM and respond to click, input and submit events.
  • Validate a form and build small features such as a to-do list, tip calculator, quiz and tabs.
  • Save data with localStorage, debug with the console and breakpoints, and fetch JSON from an API.

Course content

5 modules · 18 lessons · 5 h 6 min · 6 quizzes

Module 1: First steps with JavaScript3 lessons

Understand what JavaScript does, run your first code, and learn variables, data types, operators and template strings.

  1. What JavaScript does and how to run it 14 min
  2. Variables and data types 15 min
  3. Operators and template strings 15 min
  4. Quiz: 7 questions
Module 2: Decisions, loops and functions4 lessons

Make code choose and repeat, package it in functions, and organise data with arrays and objects.

  1. Making decisions with if, else and switch 14 min
  2. Loops: repeating work with for and while 14 min
  3. Functions, arrow functions and scope 16 min
  4. Arrays and objects with common methods 18 min
  5. Quiz: 8 questions
Module 3: The DOM: controlling the page4 lessons

Select and change elements, create new ones, react to events and handle and validate forms.

  1. Selecting elements and changing the page 16 min
  2. Creating and removing elements 14 min
  3. Events: click, input and keyboard 16 min
  4. Handling and validating forms 18 min
  5. Quiz: 7 questions
Module 4: Building small interactive features4 lessons

Put everything together in four mini projects: a to-do list that remembers its tasks, a tip calculator, a quiz and a tabbed gallery.

  1. Project: a to-do list that saves with localStorage 22 min
  2. Project: a tip and bill calculator 18 min
  3. Project: a multiple-choice quiz 20 min
  4. Project: tabs and an image gallery 20 min
  5. Quiz: 7 questions
Module 5: Good practice and next steps3 lessons

Debug with the console and breakpoints, build accessible widgets, organise your code, fetch JSON and plan where to go next.

  1. Debugging: reading errors and finding bugs 18 min
  2. Accessible widgets and organising your code 18 min
  3. Fetching JSON and where to go next 20 min
  4. Quiz: 8 questions
Final exam

27 questions. Pass with 70% or more to earn your certificate.

What you need

  • The LAF Academy course "Web Basics: Build Your First Web Page (HTML and CSS)" or equal knowledge
  • A computer with a modern browser (Chrome, Edge, Firefox) and a text editor such as VS Code or Notepad++
  • No programming experience needed

Further reading

To install on iPhone or iPad: tap the Share button in Safari, then choose "Add to Home Screen".