Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using javaScript Modify the following program so that it will print Good Morning!, Good Afternoon! or Good Evening instead according to the following logic: Midnight
using javaScript
Modify the following program so that it will print Good Morning!, Good Afternoon! or Good Evening instead according to the following logic:
Midnight till noon: Good morning (midnight inclusive, noon exclusive)
Noon till 5:00 PM: Good afternoon (noon inclusive, 5:00 PM exclusive)
5:00 PM till midnight: Good evening (5:00 PM inclusive, midnight exclusive)
// hello.js // This is a client-side JavaScript program that tells the time. // It is meant to be embeded in a web page named "hello.html". function displayHello() { document.getElementById("displayArea").innerHTML="Hello, there! Current time is: " + new Date(); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started