Decimal button not working on my calculator project


#1

I cannot get the decimal button to work in my calculator.

I’ve tried to have a var that when switched to on stops the decimal button from working. Unfortunately when clicking the decimal button two decimals are appearing and the decimal is not being dissabled. I think something is wrong with my if else statement.

CODE pen is here: https://codepen.io/Steve91/pen/RqKXyZ