js add event listener on all inputs code example
Example: javascript add event listener to all input
document
.querySelectorAll("input")
.forEach((elem) => elem.addEventListener("keyup", calculateSum));
document
.querySelectorAll("input")
.forEach((elem) => elem.addEventListener("keyup", calculateSum));