From 3de89dca334cc8973c6844998599dd82b443defb Mon Sep 17 00:00:00 2001 From: AnthonyTCS <32744832+AnthonyTCS@users.noreply.github.com> Date: Wed, 3 Apr 2019 22:18:01 +0200 Subject: [PATCH] Fix freeze screen after failing the first test --- html/scripts.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/html/scripts.js b/html/scripts.js index 07f2e817..20ce760f 100644 --- a/html/scripts.js +++ b/html/scripts.js @@ -91,10 +91,18 @@ $(".btnQuestion").click(function () { $(".btnClose").click(function () { $.post('http://esx_dmvschool/close', JSON.stringify({})); + userAnswer = []; + goodAnswer = []; + questionUsed = []; + questionNumber = 1; }); $(".btnKick").click(function () { $.post('http://esx_dmvschool/kick', JSON.stringify({})); + userAnswer = []; + goodAnswer = []; + questionUsed = []; + questionNumber = 1; }); // Handle Form Submits