Let's discuss your "JavaScript Calculator"

Howdy everyone!

Here’s mine: http://codepen.io/allanpooley/full/RpWNVm/

Would love any feedback you can throw me :wink:

I think I took a slightly different approach to your conventional calculator, I read the user story about chaining operations and made my calculator process the entire entered expression only after the equals button was hit.

Thinking about it now, it makes a whole lot more sense doing it in real time, performing a calculation between mathematical operator entries… A fix for later perhaps!

Cheers, Allan

Allan - very nice UI. I like the display screen and the power on/off button.

I noticed something - if i power off and on again the previous value is being retained - should it not restart with zero again.?

Other than that, nice work!

I love the UI, great work! There are issues using division. NaN is returned on simple division. Keep grinding, man I love how your buttons POP!

@mgazge & @timevearitt

Thanks for the feedback and words of encouragement guy. I’ll get to squashing those bugs.

Have a good one! Allan

1 Like

Project Link - http://codepen.io/kubabartak/pen/ggVqVY

Project link - https://tenzeniga.github.io/calculator.github.io/

JavaScript Calculator

Your decimals aren’t working quite right. After you put the first one in you can have any more.

I like the style. When you add/subtract decimals it seems to be converting to an int instead of a float.

Thanks Rane! I found and fixed it!

You’re calculator looks and works great. I particularly like how you’ve divided the current entry and the running total equation.

You might want to check whether your calculator handles the order of operation (When multiplication, division, addition and subtraction should occur in a long mathematical expression). I found a really great tool to help debug was this web app:
https://www.mathsisfun.com/algebra/operations-order-calculator.html

You can literally copy and paste a mathematical expression from you calculator and cross check the result.

Other than that, I checked out your blog! I read the article on Binaural Beats - which is interesting, I’ll give them a go while coding my next project. I personally like Lofi Hiphop for focusing.

Thanks for the feedback. I debated whether working in order of operations, but the example project uses a running total instead of order of operations, so I went with that.

Hi everyone,

I have just finished my calculator.

What do you think?

1 Like

Good job. It works well.

1 Like

Project link - https://codepen.io/tainansv/full/xqLRxQ/

Please, let me know if you find any bugs or have a tip to improve my code. Thanks.

Hi,
I like your classic design! It seems that I cannot type more than 1 character…

Hi!
Every calculator looks great!! :slight_smile:

Here is my calculators. http://codepen.io/aaayumi/full/NpBrqE/
I added fundamental functionality though there are a lot of things to improve. X(

Thank you for the feedback. I forget to check that feature before submit.
And I looked at your calculator. It’s a really nice design! Well done.

Project Link - http://codepen.io/gabefurlan/full/PpxjoG/

Finally finished my calculator! http://codepen.io/tommypepsi/pen/PpLEOj
you can click on the calculator or use the keyboard(ESC. will reset the calculator). You can also add parenthesis to change the priority of operation. I used RegExps to parse the operation string and return the answer. You can do complex operations, but there might be some case that I didn’t think of. I think I made this more complicated than it is haha :stuck_out_tongue:

Let me know what you think :slight_smile:

Project Link - [http://codepen.io/the-oc/full/GWLgeE/] (http://codepen.io/the-oc/full/GWLgeE/)
I feel I have so much more to learn, big learning curve for me as well as trying to use javascript with no jQuery.