12 lines
330 B
JavaScript
12 lines
330 B
JavaScript
// Returns the day of the week for the given date.
|
|
function dayName(date) {
|
|
const daysOfTheWeek = ["Sunday", "Monday", "Tuesday", "Wednesday",
|
|
"Thursday", "Friday", "Saturday"];
|
|
return daysOfTheWeek[date.getDay()];
|
|
}
|
|
|
|
// Returns a greeting for the given date.
|
|
function greeting(date) {
|
|
// FILL IN
|
|
}
|