So I completed the calculator final project on codepen.io and am fairly satisfied with it. However, I’m sure there were better ways to write my code more succinctly. I tried to keep it all annotated for readability. If anyone would be willing to take a look and let me know if there are ways I could improve the code that would be nice. In general, I’m looking for the code to achieve some kind of professionalism, but not necessarily perfection.
multiple decimals can be seen in the display if I calculate a number that has a decimal then use a decimal again. If I do any calc with that broken number the app will crash.
example:
0.5 + 0.1 = 0.6
.0.6.1 + 1 = crash
Not sure why you are putting decimal count in state, why not just check if the string contains a character?