const dayIndex = new Date().getDay(); const getDayName = (dayIndex) =>{ const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; return days[dayIndex]; } const dayName = getDayName(dayIndex)