change html text based on date......JS let date= new Date()

let day = date.getDay()

let weekday = new Array(7);
    weekday[0] = "Sunday";
    weekday[1] = "Monday";
    weekday[2] = "Tuesday";
    weekday[3] = "Wednesday";
    weekday[4] = "Thursday";
    weekday[5] = "Friday";
    weekday[6] = "Saturday";

changeText = () =&gt; {

 if(day === 1){
   firstDay.textContent = weekday[2]
   secondDay.textContent = weekday[3]
   thirdDay.textContent = weekday[4]
   fourthDay.textContent = weekday[5]
   fifthDay.textContent = weekday[6]

 }else if(day === 2){
    firstDay.textContent = weekday[3]
    secondDay.textContent = weekday[4]
    thirdDay.textContent = weekday[5]
    fourthDay.textContent = weekday[6]
    fifthDay.textContent = weekday[0]
}
}
 changeText();


this is for a weather app. I need to change the html text.content based on the current day so that the extended forecast stays accurate 

This code repeats for each day of the week it works but seems very inefficient. the purpose is to change the text in my html so the extended weather forecast is consistent
You can do:

changeText = () =&gt; {
    firstDay.textContent = weekday[(day + 1) % 7]
    secondDay.textContent = weekday[(day + 2) % 7]
    thirdDay.textContent = weekday[(day + 3) % 7]
    fourthDay.textContent = weekday[(day + 4) % 7]
    fifthDay.textContent = weekday[(day + 5) % 7]
}


Also I'd recommend passing day as a parameter. Just so that it's more clear.