function newYearsDay (year) { const dayOfTheWeekMap = { 0: 'Sunday', 1: 'Monday', 2: 'Tuesday', 3: 'Wednesday', 4: 'Thursday', 5: 'Friday', 6: 'Saturday' } const date = new Date(`1/1/${year}`) return dayOfTheWeekMap[date.getDay()] }