I am checking each checkbox status (2 elements in total).
var checked = [];
document.querySelectorAll('.checkbox').forEach(function(e,i){
checked.push(e.checked)
})
Now checked value could be
(2) [true, true]
or
(2) [true, false]
or
(2) [false, true]
or
(2) [false, false]
I am now checking it with a little bit manual way
if(checked[0] && check[1]) { ... }
If I have more elements, I have to add them manually like
if(checked[0] && check[1] && check[2]) { ... }
I am seeking a better way to polish my code, so I don't need to manually add array values to compare. Thanks