showing errors like missing ; after for-loop. Thanks for helping.
function checkAttempt(){
var studentID = document.getElementById("studentID").value;
var attempt = 0;
for (attempt < 3 && studentID == localStorage.studentID){
gradeTest;
attempt = attempt + 1;
localStorage.attempt = attempt;
}
}
for (attempt > 3 && studentID == localStorage.studentID)you meanif?whileloop.while, not afor, when you have multiple conditions like that instead of just a counter.