You are viewing a single comment's thread. Return to all comments →
function getDayName(dateString) { let dayName; let days = { Sun: "Sunday", Mon: "Monday", Tue: "Tuesday", Wed: "Wednesday", Thu: "Thursday", Fri: "Friday", Sat: "Saturday"
} let day = new Date(dateString) let arr = day.toString().split(' ') let dayshort = arr[0] dayName = days[dayshort] return dayName;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: JavaScript Dates
You are viewing a single comment's thread. Return to all comments →
function getDayName(dateString) { let dayName; let days = { Sun: "Sunday", Mon: "Monday", Tue: "Tuesday", Wed: "Wednesday", Thu: "Thursday", Fri: "Friday", Sat: "Saturday"
}