Created
July 24, 2023 21:13
-
-
Save Davisonpro/23742f0b357222555361f279cd1d22f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the day of the week | |
const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; | |
const dayOfWeek = daysOfWeek[currentDateTime.getDay()]; | |
// Display all date and time information in the span element | |
datetimeDisplayElement.textContent = `Day of the Week: ${dayOfWeek}`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment