Skip to content

Commit

Permalink
get rid of clear after equals
Browse files Browse the repository at this point in the history
  • Loading branch information
dwnorm2 committed Jan 28, 2024
1 parent cb5b91b commit 50ea47c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ document.querySelector(".add").addEventListener("click", function () {
document.querySelector(".equals").addEventListener("click", function () {
calc.equals();
showCurrentNum();
calc.clear();
});

document.querySelector(".one").addEventListener("click", function () {
Expand Down Expand Up @@ -177,7 +176,6 @@ document.addEventListener("keydown", function (event) {
case "=":
calc.equals();
showCurrentNum();
calc.clear();
break;

case "c":
Expand All @@ -198,9 +196,6 @@ function showCurrentNum() {
display.textContent = !calc.current ? "0" : calc.current;
}

// 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 50ea47c

Please sign in to comment.