vurdalak21,
const sumOdd = function(nums) {
return !nums.reduce((balance, num, i) => balance += i % 2 ? num : -num, 0)
}
const removeIndex = function(nums, ind) {
nums = nums.slice(0);
nums.splice(ind, 1);
return nums
}
const waysToMakeFair = function(nums) {
return Object.keys(nums).filter(ind => sumOdd(removeIndex(nums, ind)))
};
alert(waysToMakeFair( [2,1,6,4]));