()
| 1 | var res = "question not found"; |
| 2 | |
| 3 | function submitAnswer(){ |
| 4 | // console.log(res); |
| 5 | |
| 6 | document.querySelector("#answerBox").innerHTML = ""; |
| 7 | |
| 8 | var userInputVal = document.querySelector("#userInput"); |
| 9 | var warningMsg = document.querySelector("#warning"); |
| 10 | |
| 11 | // console.log(userInputVal.value); |
| 12 | if (!userInputVal.value) { |
| 13 | warningMsg.innerHTML = "PLEASE ENTER YOUR ANSWER OR GO TO NEXT QUESTION "; |
| 14 | } |
| 15 | else if (userInputVal.value == res) { |
| 16 | warningMsg.innerHTML = "WELL DONE! GO TO NEXT QUESTION"; |
| 17 | document.getElementById("warning").style.color = "green"; |
| 18 | // console.log("well done"); |
| 19 | } |
| 20 | else { |
| 21 | warningMsg.innerHTML = "WRONG ANSWER TRY AGAIN"; |
| 22 | document.getElementById("warning").style.color = "red"; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | function nextQues(){ |
| 27 |
nothing calls this directly
no outgoing calls
no test coverage detected