days of week array js code example
Example 1: array days of the week
dayName = new Array ("Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
Example 2: js day monday tuesday wednesday
const WEEK_DAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const date = new Date();
const literalDayOfWeek = WEEK_DAYS[date.getDay()];