NeonMan,
let items = [{
blue: false,
red: false
},
{
blue: false,
red: false
},
{
blue: false,
red: true
},
{
blue: false,
red: true
},
{
blue: false,
red: true
}
]
const halfRed = arr => {
let { length } = arr;
let i = length / 2;
i = Math.ceil(i);
for (; --length;) {
i -= arr[length].red;
if (!i) return true;
if (i > length) return false;
}
return false
}
console.log(halfRed(items))