Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago