From fd2b22cd2a33d1f1da145f3d75719552ef8d6c2b Mon Sep 17 00:00:00 2001 From: Nientai Ho Date: Wed, 22 Jun 2022 17:09:27 +0800 Subject: [PATCH] Fixed typo addEventListener --- 4-typing-game/typing-game/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-typing-game/typing-game/README.md b/4-typing-game/typing-game/README.md index 94c59525..0c240208 100644 --- a/4-typing-game/typing-game/README.md +++ b/4-typing-game/typing-game/README.md @@ -14,7 +14,7 @@ The way we mark a section of code we want to execute is by creating a function. To handle events (button clicking, typing, etc.), we register **event listeners**. An event listener is a function which listens for an event to occur and executes in response. Event listeners can update the UI, make calls to the server, or whatever else needs to be done in response to the user's action. We add an event listener by using [addEventListener](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener), and providing a function to execute. -> **NOTE:** It's worth highlighting there are numerous ways to create event listeners. You can use anonymous functions, or create named ones. You can use various shortcuts, like setting the `click` property, or using `addEventListener`. In our exercise we are going to focus on `addEventLister` and anonymous functions, as it's probably the most common technique web developers use. It's also the most flexible, as `addEventListener` works for all events, and the event name can be provided as a parameter. +> **NOTE:** It's worth highlighting there are numerous ways to create event listeners. You can use anonymous functions, or create named ones. You can use various shortcuts, like setting the `click` property, or using `addEventListener`. In our exercise we are going to focus on `addEventListener` and anonymous functions, as it's probably the most common technique web developers use. It's also the most flexible, as `addEventListener` works for all events, and the event name can be provided as a parameter. ### Common events