I have to develop a quiz with javascript, the first part I have already developed that are to pick up the answer of questions with only 1 correct answer, but I am not able to do the second part which are the questions with more than one correct answer, I thought in using the checkbox, but it did not work, I'll put the code I made for a correct answer
<p><input type="radio" name="questao" value="A">resposta 1</p>
<p><input type="radio" name="questao" value="B">resposta 2</p>
<p><input type="radio" name="questao" value="C">resposta 3</p>
<p><input type="radio" name="questao" value="D">resposta 4</p>
<p id="mensagem"></p>
var resposta = "D"; // Resposta correta
$("input[name=questao]").on("click", function() {
var value = $(this).val();
var mensagem = "";
resposta == value ? mensagem = "Parabéns, Acertou!" : mensagem = "Resposta errada, tente novamente";
$("#mensagem").html("<strong>" + mensagem + "</strong>");
});