Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
Disabled operators after the clear button is pressed
  • Loading branch information
Poornaka authored Jun 8, 2021
1 parent de00366 commit 3ce83ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ for (i = 0; i < operatorButtons.length; i++) {
document.querySelector('button.clear').addEventListener('click', function() {
input.value = null;
ans.innerHTML = "∞";
for (i = 0; i < operatorButtons.length; i++) {
operatorButtons[i].disabled = true;
}
})

decimal.addEventListener('click', function() {
Expand Down

0 comments on commit 3ce83ec

Please sign in to comment.