There are 30 .block blocks styled as a calendar. Is it possible to make a beautiful cycle in JS so that for example every 6 and 7 block (responsible for weekends) is painted in a different color, like this:
for (let i=0; i<30; i++) { ----<УСЛОВИЕ>---- { document.getElementsByClassName('block')[i].style.background = "green"; } } (Not using additional classes for .block)
if ((i % 5) === 0) { /* каждый шестой */- Lexx918