I am making a simple multiple choice quiz for a school project and i keepgetting: Syntax error: Unexpected token ILLEGAL. I dont know whats wrong. Heres the code:
var Question1 = prompt("What is (40 / 2) + 6: A:5 B:10 C:26 D:None of these"); var question1 = Question1.toUpperCase switch (question1) {case "A": answer1 = "A" break; case "B": answer1 = "B" break; case "C": answer1 = "C" break; case "D": answer1 = "D" break; default: } console.log(answer1)