Question: what errors are in the following javascript? document.getElementById ( button 0 ) . onclick = function ( ) { runCalculator ( 0 )

what errors are in the following javascript? document.getElementById("button0").onclick = function(){
runCalculator(0);
}
document.getElementById("button1").onclick = function(){
runCalculator(1);
}
document.getElementById("button2").onclick = function(){
runCalculator(2);
}
document.getElementById("button3").onclick = function(){
runCalculator(3);
}
document.getElementById("button4").onclick = function(){
runCalculator(4);
}
document.getElementById("button5").onclick = function(){
runCalculator(5);
}
document.getElementById("button6").onclick = function(){
runCalculator(6);
}
document.getElementById("button7").onclick = function(){
runCalculator(7);
}
document.getElementById("button8").onclick = function(){
runCalculator(8);
}
document.getElementById("button9").onclick = function(){
runCalculator(9);
}
document.getElementById("buttonAdd").onclick = function(){
runCalculator("+");
}
document.getElementById("buttonMinus").onclick = function(){
runCalculator("-");
}
document.getElementById("buttonMultiply").onclick = function(){
runCalculator("*");
}
document.getElementById("buttonDivide").onclick = function(){
runCalculator("/");
}
document.getElementById("buttonDecimal").onclick = function(){
runCalculator(".");
}
// Send an empty text string if the Enter key is clicked
document.getElementById("buttonEnter").onclick = function(){
runCalculator("");
}
// Clear the calculator window if the C key is clicked
document.getElementById("buttonClear").onclick = clearCalculator;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!