Skip to content

Commit d7564b2

Browse files
authored
Merge pull request #82 from cdmain/main
typo fixed
2 parents 36d1288 + 90caab9 commit d7564b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lessons/05-putting-it-all-together/B-events-and-listeners.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ input.addEventListener("keyup", function () {
4949

5050
Try typing into the input. You'll see whatever text you type into the input will instantly be reflected in the `p` tag. Pretty cool, right?
5151

52-
- We're now using the `keyup` event. This event happens whenever you release a key after pressing it. As you may guess, there is a `keydown` event too that is fired whenver you press a key. We're using `keyup` because `keydown` happens _before_ a key actually registers which means we would always be one key behind.
52+
- We're now using the `keyup` event. This event happens whenever you release a key after pressing it. As you may guess, there is a `keydown` event too that is fired whenever you press a key. We're using `keyup` because `keydown` happens _before_ a key actually registers which means we would always be one key behind.
5353
- We're reference `input.value`. The value property of an input reflects whatever the user has typed into the input.
5454
- We're taking whatever is in `input.value` and passing that directly into the `paragraph.innerText`. Since that function is called every time a user types into the input, it keeps the two in sync!
5555

0 commit comments

Comments
 (0)