From bc12cd973170b7613985b215939cac4779040593 Mon Sep 17 00:00:00 2001 From: lolabird Date: Wed, 27 Dec 2023 21:55:56 -0700 Subject: [PATCH] Clear topScreen on number press after operation is fully evaluated --- script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script.js b/script.js index ceb3153..4c39697 100644 --- a/script.js +++ b/script.js @@ -72,6 +72,10 @@ function displayNum() { mainScreen.textContent += this.textContent; } + if (isEval) { + topScreen.textContent = ""; + } + isEval = false; }