[Feedback] JavaScript Calculator

[Feedback] JavaScript Calculator
0

#1

Been getting really informative feedback. Got to get back and improve on my previous projects too. Meanwhile, what do you think about this one.


#2

For feedback I personally would have made the calculator a LITTLE bit bigger, so you could have enough room to give each button a little bit of padding so they are not right up next to each other.

Plus for each button you can add the css cursor: pointer to give the number buttons a button/link kind of feel when they are hovered over.

I personally would also change the info text from the top left (which it looks crowded) to the bottom or somewhere else where it doesn’t look it it’s just floating out in space.

But the calculator in functional and that was the main objective of the challenge so good job :slight_smile:


#3

My first test was to enter a chain of operations: 7+89/3-5*23

On my actual desk calculator, that equals 621.

On your app, it was -78.333333

Why?


#4

It is a expression calculator. Instead of answering One expression at a time. Like 7 + 89 = 96 -> 96 / 3 = 32 -> 32 -5 = 27 -> 27 * 23 = 621.
It directly evaluates the expression using BODMAS principle in which operator precedence is observed. Operator precedence being Bracket > Of > Division > Multiplication > Addition > Subtraction respectively. If you use Operator precedence then the answer would is -78.3333 or you can even google your expression.:slight_smile:


#5

This seems really hard to do. The javascript part, I mean.


#6

Check out my code I have links to the resources of the algorithms I have used.


#7

I thought you might be trying for something like that. It’s not calculator like, but it’s doing what you wanted!