From f091d7e608d3fdd24f5e73459ee98586cb5de7ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nacho=20L=C3=B3pez?=
<145539062+KrilinZ@users.noreply.github.com>
Date: Mon, 3 Aug 2026 14:10:43 +0200
Subject: [PATCH 1/4] docs(readme): rewrite for clarity, SEO and AI answer
engines
---
README.md | 245 ++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 191 insertions(+), 54 deletions(-)
diff --git a/README.md b/README.md
index b2ab513..f13ae70 100644
--- a/README.md
+++ b/README.md
@@ -1,91 +1,228 @@
-# Event-Oriented Programming with JavaScript
+
+
+
+# Javascript Events
+
+[](https://4geeks.com/en/interactive-exercise/javascript-events-exercises)
+[](https://github.com/learnpack/learnpack)
+[](https://codespaces.new/?repo=4GeeksAcademy/javascript-events-tutorial-exercises)
+
+
+
+
+
+*These instructions are [also available in 🇪🇸 Spanish](https://github.com/4GeeksAcademy/javascript-events-tutorial-exercises/blob/HEAD/README.es.md).*
+
+
+This interactive tutorial covers event handling in vanilla JavaScript across 10 exercise folders: one introduction plus 9 hands-on challenges. You practise the `onclick` attribute, `addEventListener`, the `load` event, `event.target`, and changing CSS from JavaScript. Each of the 9 challenges ships an `index.html`, an `index.js`, instructions in English and Spanish, and a reference solution file. Estimated time: 8 hours. Difficulty: beginner.
-
+## 📋 About this tutorial
+
++ **Difficulty:** beginner — it is the fifth step of the 4Geeks Academy web development track, right after The DOM.
-> By [@alesanchezr](https://twitter.com/alesanchezr) and [other contributors](https://github.com/4GeeksAcademy/javascript-events-tutorial-exercises/graphs/contributors) at [4Geeks Academy](https://4geeksacademy.co/)
++ **Estimated duration:** 8 hours.
-
-[](https://breatheco.de)
-[](https://twitter.com/4geeksacademy)
++ **Exercises:** 10 folders inside `exercises/` — `00-introduction` (reading only) plus 9 exercises where you write code.
-This tutorial is part of a bigger group of tutorials about web development, this repository focuses only on JavaScript Events, you will learn Mouse Events, Keyboard events, Frame Events and how to react to those events to make your web application interactive.
++ **Technologies:** vanilla JavaScript, HTML and CSS. No frameworks, no build step, no `npm install` inside the exercises.
-*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/4GeeksAcademy/javascript-events-tutorial-exercises/blob/master/README.es.md) :es:*
++ **Grading:** disabled. `learn.json` sets `"disableGrading": true` and no exercise contains a test file, so nothing marks your answer automatically.
+
++ **Solutions:** each of the 9 coding exercises ships a reference solution: `solution.hide.js` in all of them except `01`, and `solution.hide.html` in `01`, `02`, `05` and `07`, the four where the HTML changes.
+
++ **Languages:** every exercise has both `README.md` (English) and `README.es.md` (Spanish).
+## 🎯 What will you learn?
+
+An event is anything that happens on the page and that your code can react to: a click, a key press, the window finishing its load. Handling events is what turns a static document into an application. By the end of these exercises you will be able to:
+
++ Attach a handler straight from the HTML with the [`onclick`](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) attribute, which is how exercises `01`, `02`, `03`, `04`, `07` and `07.1` wire their buttons.
+
++ Register handlers at runtime with [`addEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener), the technique used in exercises `06` and `08`.
+
++ Wait for the [`load`](https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event) event before touching the page, either with `window.onload` or with the `onload` attribute of the `` tag.
+
++ Read what the user typed with `input.value`, convert it with `parseInt`, and write the result back into another input.
+
++ Change CSS from JavaScript through the `element.style` object, for instance hiding a `
` with `style.display = "none"`.
+
++ Keep state between clicks in a global variable and repaint the screen with `innerHTML` after every change.
+
++ Use the [event object](https://developer.mozilla.org/en-US/docs/Web/API/Event/target) that the browser passes to your handler, and identify the exact element the user clicked with `event.target`.
+
+## 👀 What will you build?
+
+`exercises/00-introduction` is a short welcome page with no code. The other 9 folders are small websites you have to finish:
+
++ **`01` Alert onclick** — the page has two buttons and `myClickFunction` already alerts "Your first function!". You add the same function as the `onclick` listener of `#button2`.
+
++ **`02` onclick Hello World** — nothing is wired yet: you declare the listener function in `index.js` and set it as the `onclick` property of the `#hello` input so a click alerts "Hello World".
+
++ **`03` Sum Values** — complete `calculateSumListener` so the sum of the `#firstNumber` and `#secondNumber` inputs is written into the `value` of the `#resultNumber` input.
+
++ **`04` Hide onclick** — complete `myEventListener` so clicking the button hides the green `#firstDiv` while the yellow `#secondDiv` stays visible.
+
++ **`05` The load Event** — create a function called `loadListener` that alerts "Loading finished..." and make the `` run it on load.
+
++ **`06` Add Listener With JS** — the page already alerts when it finishes loading. You use `addEventListener` on the `#theGreen` button so clicking it alerts "woohoo!".
+
++ **`07` Count onclick** — the counter only goes up. You add a Decrease button and a handler that subtracts one from the global `counter` and refreshes the `#screen` heading.
+
++ **`07.1` Change Turn on Click** — the turn switches between Mario and Juan. You extend the `turnChanger` function so a third player, Josh, joins the rotation.
+
++ **`08` Event Target** — a single click listener sits on the `#container` div, which holds a button, a link and an image. You alert the `id` of the element that was actually clicked.
+
+Each exercise is a real page you can run and click on while you read the instructions next to it:
+
+
+
+## 🎓 What do you need before starting?
+
+No previous knowledge of events is required, but the exercises assume you are comfortable with:
+
++ **Basic HTML** — tags such as `