Hi,
I have been working on my calculator for about two weeks now. I got most of the functionality down pretty fast, but am stuck on two thing.
Currently a user cannot input two consecutive dots, but they can do something like this 1.2.3 + 5. How can I prevent that from happening?
After user gets a total , if they press a number, that number just gets tacked on to the back of the total. So, if the total is 12, and the user presses 3, they have 123 in the input field, and fututre calculations are performed on 123. I want it to be so that when the user presser a number, it resets the calculator to that number. So if your total is 12 and you press + 3, you get 15, but if you just press 3, all future calculations will be preformed on 3.
Please let me know if I didn’t explain the issues well?
Please help.
Thanks!
I didn't find the right solution from the Internet.
References:https://forum.freecodecamp.org/t/help-with-the-calculator/165960
Animated video for business