Skip to content

Commit 89f6835

Browse files
committed
if-else question added
1 parent c91d0ec commit 89f6835

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Look up how to get the current time in Javascript. Based on this, create a series of if-else statements that will check against the current time and print either: "Good morning!" if it's from 6:00am-12:00pm, "Good afternoon!" if the time is between 12:00pm - 6:00pm, "Good evening!" if the time is from 6:00pm to Midnight, and "Good night!" if the time is from Midnight to 6:00am. If these instructions are ambiguous, use your judgement to solve the problem as you see fit. Note: Checking multiple boolean expressions is something we have yet to learn. You can wait until class Tuesday for us to go over them, however I encourage you to look them up in advanced: Check out the &&(and) || (or) operators to understand how to combine multiple boolean checks.

0 commit comments

Comments
 (0)