From fa938273cab9adfd1b3a184b89c82f30de5addce Mon Sep 17 00:00:00 2001 From: Pedro Miguel Martinho Nunes <44981871+pedro2mnunes@users.noreply.github.com> Date: Sun, 27 Dec 2020 15:34:25 +0000 Subject: [PATCH] Update app.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the current time is 00:01 the program will show Good morning when it should be Good evening. Usually: Good Morning 5:00 AM — 11:59 AM Good Afternoon 12:00 PM — 4:59 PM Good Evening 5:00 PM — 4:59 AM So, I suggest changing the IF clauses as proposed. --- app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index d61477b..94d8a7f 100644 --- a/app.js +++ b/app.js @@ -10,11 +10,11 @@ const messageArea = document.querySelector('#message'); //add a click event to the button button.addEventListener('click', function(){ //check for morning, noon, or evening -if (hour > 17){ +if (hour >= 17 || hour <5){ messageArea.innerHTML = `