This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Array with all gpas | |
const gradeNodes = [document.getElementById('grade1')]; | |
const grades = []; | |
// Create click event listeners for each gpa | |
gradeNodes.forEach((gradeNode, i) => { | |
gradeNode.addEventListener("click", () => { | |
gradeNodes[i].innerHTML = `<input value="${grades[i]}" id="${i}" />` | |
}); | |
}); |