Quote:
The problem I am facing is that I am getting correct score if clicked on submit button each time but not getting correct score if pressed enter to submit the answer.
Do you understand that your quizz page is made of 2 part intimately linked together, html and Javascript ?
By providing only JS part, you prevent us from helping you.
I have not played with JS for a long time, but this loop is doing nothing
function showQuestion() {
let question = questions[currentQuestion];
$('.input').val(question.title);
$('.quiz').html();
for (var i = 0; i < question.answer.length; i++) {
}
}