From f287fae7e741fa777c04c958bfe63a25c90ed436 Mon Sep 17 00:00:00 2001 From: dauntless-strategy-1036 Date: Sun, 22 Nov 2020 11:29:12 +0000 Subject: [PATCH] Done. --- README.md | 2 +- js/index.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 050cc86c..3f7cf935 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Interacting with the DOM via JavaScript - Codealong +learn # Interacting with the DOM via JavaScript - Codealong ## Problem Statement diff --git a/js/index.js b/js/index.js index 17452e23..637548b3 100644 --- a/js/index.js +++ b/js/index.js @@ -1,2 +1,5 @@ -// using this file is optional -// you can also load the code snippets in using your browser's console +const main = document.getElementById('main'); + +main.addEventListener('click', function(event) { + alert('I was clicked!'); +});