My Code is designed using js only no other external library and shows desired output still fails the javascript calculator test. it works as asked but still fails the more than one “.” point test help.
Then it doesn’t work as asked
But seriously, you know what the problem is. You are allowing multiple decimal points in a row and you shouldn’t be. If the last character entered is a decimal point then if the next button pressed is also the decimal point, then nothing should happen (that button press should be ignored).
How do you think you would go about implementing this?
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.