I’ve recently “completed” my calculator project. I put completed in quotes because I’m very much aware that my code needs to be cleaned up and simplified in spots. My process (for better or worse) is typically to get things working first, and then go back to reevaluate how I wrote the code and look for what I can do better.
Anyway, my main request right now is to play around with the actual calculator and let me know if you find any bugs. You can use your keyboard for all the controls as well, though there may be a couple issues there depending on your keyboard layout. Also, if there’s any LOST fans out there, I added an Easter egg (think numbers on the show). Here’s the link:
you can put in more numbers than the display can fit - try typing 20 numbers
if you put in 9/0 you get a string “infinity”, you can then put in a number after it (this one probably isn’t much of a problem, but it’s there)
I took a quick look at the code to try and find your easter egg (found it), one thing I saw at first glance when you are setting state is that you can “condense” this…
Thank you! I appreciate having someone check possibilities I didn’t even think to check! And yes, I was hesitant to combine the setState objects, but that was one of the things I wanted to look back and to try and improve. Thanks for the tip!