Fix what is wrong with the code it needs to have.

1. 4 Questions Anything appropriate
2. It needs to say "Correct" when the answer is correct and it needs to say "Sorry, Try Again" when it is wrong.
3. and it needs a next button when you get it correct and it needs to go on to the next and when you are done with the quiz it needs to have what your score is and a restart button
```html
<!DOCTYPE html>
<html>
<head>
<script>
var tries = 2;

```javascript
function next() {
// Clear the input field and result message
document.getElementById('answer').value = "";
document.getElementById('result').innerHTML = "";
// Hide the next button again
document.getElementById('nextBtn').style.display = 'none';
}
var answer = document.getElementById("answer").value;
if (answer === "correct") {
document.getElementById("result").innerHTML = "Correct!";
document.getElementById("nextBtn").style.display = "block";
} else {
tries++;
if (tries < 2) {
document.getElementById("result").innerHTML = "Try again";
} else {
document.getElementById("result").innerHTML =
"The correct answer is: correct";
document.getElementById("nextBtn").style.display = "block";
}
}
}

function next() {
// Logic for moving on to the next question
}
</script>
</head>
<body>
<input type="text" id="answer" />
<button onclick="checkAnswer()">Submit</button>
<p id="result"></p>
<button id="nextBtn" style="display: none" onclick="next()">Next</button>
</body>
</html>
```

<!DOCTYPE html>

<html>
<head>
<script>
var tries = 0;

function checkAnswer() {
var answer = document.getElementById("answer").value;
if (answer === "correct") {
document.getElementById("result").innerHTML = "Correct!";
document.getElementById("nextBtn").style.display = "block";
} else {
tries++;
if (tries < 2) {
document.getElementById("result").innerHTML = "Sorry, Try Again";
} else {
document.getElementById("result").innerHTML = "The correct answer is: correct";
document.getElementById("nextBtn").style.display = "block";
}
}
}

function next() {
// Logic for moving on to the next question
}
</script>
</head>
<body>
<input type="text" id="answer" />
<button onclick="checkAnswer()">Submit</button>
<p id="result"></p>
<button id="nextBtn" style="display: none" onclick="next()">Next</button>
</body>
</html>