javascript – add click eventlistener to array of buttons in for loop

I’m trying to loop through an array of buttons and add an eventlistener to the button that is clicked

for( j = 0; j < questionsObj(questionCounter).answersArr.length; j++) {

        var answer = document.createElement("button");
        answer.className = "btn answer-btn";
        var answerValue = questionsObj(questionCounter).answersArr(j);
        answer.setAttribute("value",answerValue);
        answer.innerHTML = answerValue;

        answerContainer.appendChild(answer);

        document.querySelector('.btn').addEventListener('click', function() {
        event.preventDefault();
        console.log('next');
        });

        
        
    } // End for loop