JavaScript is the language that makes web pages interactive. It is named in many of the frontend adverts we studied, and the frameworks employers ask for, such as React and Next.js, are all JavaScript underneath. This section is the longest climb in the roadmap, so take it steadily.
What JavaScript does on a page
HTML gives structure and CSS gives style. JavaScript adds behaviour:
- Filtering a price list as someone types.
- Showing or hiding a menu when a button is tapped.
- Checking a form before it is sent.
- Loading fresh data, such as exchange rates or order status, without reloading the page.
const button = document.querySelector("#greet");
button.addEventListener("click", () => {
alert("Welcome to Mariama's Tailoring!");
});Three lines: find the button, listen for a click, then do something.
What this section covers
- JavaScript fundamentals: variables, functions, arrays, objects, loops and conditions. The building blocks of every program.
- The DOM and events: reading and changing the page in response to taps, typing and scrolling.
- Fetching data and async code: talking to servers and APIs, and handling slow or failed connections gracefully.