Hi,
I am trying to build the calculator, but I have issues with user stories 11 (and 12).
If I allow multiple decimal points (which is of course not acceptable), I can pass user story 12 (operations on decimal numbers).
If I disable the button decimal after the first press:
if(event.target.innerHTML === '.')
document.getElementById("decimal").disabled = true;
and of course I re-eanble it when I press an operation or the equal sign, I still am not able to pass user story 11, and in addition I can pass user story 12 anymore!
But the calculator does its job: I can’t add more than one decimal per number, and I can perform calculations on decimal numbers…
Could anyone please help?
Here is my pen for reference:
https://codepen.io/simone-saimon-rossi/pen/LYbQWyr
Thank you
Kind regards
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
.
Challenge: Build a JavaScript Calculator
Link to the challenge: