From d6ff4c8e2c014973cbb8e47e14298073a4c6597b Mon Sep 17 00:00:00 2001 From: "s.eser" Date: Fri, 26 Apr 2024 20:35:51 +0200 Subject: [PATCH] comma fixes --- calculator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calculator.js b/calculator.js index 8eb9272..cc7c63b 100644 --- a/calculator.js +++ b/calculator.js @@ -13,6 +13,10 @@ const operatorPlus = document.getElementById("plus"); function appendToDisplay(input){ + if(input=='.' && display.value.includes('.')){ + return; + } + if(operatorSelected){ if(operator == '+'){ operatorPlus.style.backgroundColor = "#ff9f0a";