From 668bd1fb8b382a326189429ac861998247c9a976 Mon Sep 17 00:00:00 2001 From: Cayla Horsey Date: Tue, 14 May 2024 08:54:13 -0400 Subject: [PATCH] Add event listener function --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index e36025b00..11c59f808 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,6 @@ function addingEventListener() { + const input = document.getElementById('button'); + input.addEventListener('click', function() { + alert('I was clicked!'); +}); }