Skip to content

Commit

Permalink
fix 9 and 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dwnorm2 committed Jan 26, 2024
1 parent 4a4e727 commit c89b3c6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ document.querySelector(".six").addEventListener("click", function () {
});

document.querySelector(".seven").addEventListener("click", function () {
calc.inputNum(71);
calc.inputNum(7);
showCurrentNum();
});

Expand All @@ -109,7 +109,12 @@ document.querySelector(".eight").addEventListener("click", function () {
});

document.querySelector(".nine").addEventListener("click", function () {
calc.inputNum("nine");
calc.inputNum(9);
showCurrentNum();
});

document.querySelector(".zero").addEventListener("click", function () {
calc.inputNum(0);
showCurrentNum();
});

Expand Down Expand Up @@ -180,3 +185,5 @@ display.textContent = "0";

//to do:
//create previous num variable and conditionals to work off of previous num
//update styles
//add conditionals to prevent invalid inputsS

0 comments on commit c89b3c6

Please sign in to comment.