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";