-
-
Save AbhinavMadahar/50ad57186bca297b59fa3cb4cfdf3735 to your computer and use it in GitHub Desktop.
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}" />` | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment