You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lessons/05-putting-it-all-together/B-events-and-listeners.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ input.addEventListener("keyup", function () {
49
49
50
50
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?
51
51
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.
53
53
- We're reference `input.value`. The value property of an input reflects whatever the user has typed into the input.
54
54
- 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!
0 commit comments