Just finish my javascript calculator app. Need help in finding bugs! Some feedback and suggestion is deeply appreciated

Just finish my javascript calculator app. Need help in finding bugs! Some feedback and suggestion is deeply appreciated
0.0 0

#1

here is my app - http://codepen.io/mikeale03/full/dXJdaN/. I work so hard to make it bug free but its is hard to avoid and and tract all bugs. I also have problem with javascript arithmetic. is not as precise like the real calculator. So i would really appreciate any suggestions or feedback from you guys!


#3

@P1xt Thank you for your feedback. Your feedback really makes me happy for my work. I think there is a lot more to improve in my code. It is not very well organized. An object oriented approach would be much better.


#4

Great job!!
There are some “looks and feels” I maybe would do differently, but that’s a personal style I guess…

After quite some pressing around I found something that at least resembles undesired behaviour? But I have to say that this feels a bit forced to call a “bug”, afterall you’ve handled it somewhat.

When you recieve an “Invalid Input” (like doing sqrt of a negative number) and then try to continue by just pressing “+” and “+5” you try to calculate NaN + 5 and of course the result will be NaN. Maybe if you “keep calculating” after getting an 'Invalid Input' or NaN it automatically should be replaced with “0”.

Really good work! And of course it would be “cooler” with an object oriented approach, but your project is really good without that.

A side note, I had to try how my desk calculator reacted on sqrt(-5), and it calculated the sqrt of positive five! That’s some odd behaviour :wink:


#5

@heennkkee. Wow. Thanks for pointing that out. Now i have to fix it. The “looks and feel” really not so good. I’m not a good designer. But i will keep on learning. I really appreciate your feedback. Thanks a lot!