Answer the question
In order to leave comments, you need to log in
How to get the next 3 days of the week?
How to get the next 3 days of the week (Monday,Tuesday,Wednesday)? It is necessary to display the current day of the week and the next two on the page. Implemented using an array:
let week = [];
week = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday",
];
let today = new Date();
let day = today.getDay();
document.querySelector('.current_day').textContent = week[day];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question