let getDayOfWeek = function(dayW, MyDay) {
let week = [‘воскресенье’, ‘понедельник’, ‘вторник’, ‘среда’, ‘четверг’, ‘пятница’, ‘суббота’];
let oneDay = MyDay + (week.indexOf(dayW)-1);
for(i = 0; i < week.length; i++) {
if(oneDay % 7 === i) {
MyDay = week[i];
}
}
return MyDay;
}