Я хочу использовать приведенный ниже фрагмент для проверки нескольких OTPs
.Если один OTP правильный, пользователю следует задать следующий вопрос.После 4 вопросов покажите привет.
var question = prompt('Who shot Abraham Lincoln?');
switch (question) {
case 'john wilkes booth':
case 'John Booth':
case 'John Wilkes Booth':
alert("That\'s Right!");
window.location.href = 'q2.html';
break;
default:
alert("Sorry, that\'s not right.");
alert('Please try again');
history.refresh();
break;
}
Нужна помощь для перестройки кода выше.