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 = `

Good evening!

`; -} else if (hour > 12){ +} else if (hour >= 12 || hour< 17){ messageArea.innerHTML = `

Good afternoon!

`; } else { messageArea.innerHTML = `

Good morning!

`; } -}) \ No newline at end of file +})