Short quiz with 10 questions about Superheroes developed in functional JavaScript...
- For
$form.addEventListener()add external functionbtnClicked() - Add missing
removeEventListener()method forbtnClicked(), which cause error when starting game for second, third, (etc.) time, without reloading browser. Errors/Updates:- In
function check(answer)question object was undefined - When you click on button to choose answer, it calls
check(event.target.value)as much times as you started new game without reloading browser - remove unnecessary code, optimize code
- In