let choice = new Set([1,2,3,4]);
currentMonth = 1;
//Псевдокод
let object = {
choice[0] : currentMonth,
choice[length-1] : currentMonth
}
let choice = new Set([1,2,3,4]);
let choiceArr = [...choice];
let currentMonth = 1;
let object = {
[choiceArr[0]] : currentMonth,
[choiceArr.at(-1)] : currentMonth
}