All the functions will use the email input into the form. The field cannot be blank and must be
formatted as a valid email address.
Create a function that will display the email address on the Email Address: line. Call this function
with the Display Email Address button.
Create a function that will display just the username portion of the email address on the Username:
line. Call this function with the Display UserName button. Example student@dmacc.edu will display
'student'.
Create a function that will display just the domain name portion of the mail address on the Domain Name:
line. Call this function with the Display Domain name button. Using the above example will display
'dmacc.edu'.
If the email address has a top level domain of .edu change the Domain Name display to a light blue
background.
The "Enter New Email" button should return the form and the display fields to their original values.
Date Object Assignment:
Today is:
Date Instructions:
1. Create a function called formatMMDDYYYY(inputDate)
the function will accept an input parameter that is a date object
use the methods of the Date object to get the month, date and year from the input date object
concatenate the pieces together to format the string mm/dd/yyyy
return the formatted string
Display todays date next to the Todays Date button using the formatMMDDYYYY().
The Reset Date Examples should call a function to clear the date examples.
2. Create a function called friendlyDate(inputDate)
the function will accept a date object as input
it will produce and return a string formatted like "Saturday December 18, 2023"
Display todays date when you click the Friendly Date button using the friendlyDate().
3. Create a JavaScript function that will always display the current year in the Copyright statement of the
footer.