When I click on my arrow, I would like to see if the inputs that were currently displayed on my page were checked. If not I want to display modal. Unfortunately it only works on the first two questions(first click). I would ask for a hint on how to check the next inputs. Here is the all JS code: https://codepen.io/paulina-mi/pen/jOybQGe
arrowBtn.addEventListener("click", () => {
const checkedAnswers = answers.filter(answer => answer.checked);
if(checkedAnswers.length < 2) {
modal.classList.add("modal-active");
modalInfo.innerText = "Wszystkie pola muszą być zaznaczone!"
}