Skip to content

Commit 8f74698

Browse files
committed
added an event listener for the "keyup" to update the display when the user types in the input field.
1 parent b5c7f47 commit 8f74698

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sprint-3/alarmclock/alarmclock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let totalSeconds = 0;
1111
function main() {
1212
// add an event listener to the "input" element that will call the counterUpdate function when clicked on
1313
document.getElementById("alarmSet").addEventListener("click", counterUpdate);
14+
document.getElementById("alarmSet").addEventListener("keyup", counterUpdate);
1415
}
1516

1617
// define the function that will update the counter

0 commit comments

Comments
 (0)