Looking for some calculator feedback

Looking for some calculator feedback
0.0 0

#1

Hello all,

I’ve been working for a bit on the Javascript calculator and I feel like it’s finally in an alright-ish place.

It can handle most math including stringing operations together, shouldn’t let you do division by 0 or any goofy multiple decimal points and it has some keyboard support (seems to freak out when using numpad repeatedly, but I’m not 100% sure what’s going on since the error only happens once in a while… still debugging that, but basic numbers and operations should be fine)

Any feedback or edge cases I missed would be greatly appreciated. JS Calculator

Thank you,


#2

Hi, I found few cases where it fails to give correct calculation results E.g: 9/9*9=0.1111… and 9x6-9x6=270 and 2.3.6x5=NaN few other related to priority of operators.I think it’s because, you are performing operations before taking the entire expression.
Overall look is nice.Only thing is need to take care of few edge cases.
I think it would be better to paste the link of your code in www.codepen.io while looking for feedback.I mean it’s easy to analyse the function of your code.