Made it somehow, but it's ugly as hell, I know... Check my calc, please!

There are bugs, but it’s sort of working, so I’m satisfied. What do you think, especially about JS part, since design is not something I’m very good at…

I think it looks fine. The first thing I test with the calculators is how it handles input.

I would say that the best way to improve your app is to control how the user can input their calculations. It’s not a bad start, though!

1 Like

Thanks, never thought about that problem… Well, I’ll try to perfect it after I’m done with other projects. :slight_smile:

Aesthetically the calculator is good. The js overall seems to be fine. I think all that may be needed is some code to only allow one operation to be entered at a time. This could be done many ways.

For example, one could create a variable that flags when an operator is in use. When the variable has the value of true, the code ignores all input from operators.

Similarly, by tracking the number of characters entered, one could disallow input and give an overflow message after so many characters. This could probably be done using the length method.

You are making good progress!

1 Like

One more problem with the screen and a string length, also pay attention at decimal numbers- only one dot allowed for a number (you can use reg expressions to solve this and other problems with symbols).

Thanks, will look into it!