Hi all this is more of a code review question. But it would help me immensely if someone could explain how to loop the following code to be more DRY. Particularly looking at this code:
I think that’s an interesting thing to discuss – answering your last paragraph…
Do the fields have to be called “Monday”, “Tuesday”, …? If you’d call them “weekday1”, “weekday2”, … you could simply loop over them.
Keeping the weekdays as words you would probably need an array with the weekdays for the loop. That would at least be a bit DRYer.