Infix Expressions VS Postfix Expressions, and How to Build a Better JavaScript Calculator
Pramod Sripada
203

So… here is my calculator :

http://codepen.io/gordondavidescu/pen/pgEBdK

Right now (March 3, 2016) it is very ugly but it actually calculates correctly.

I use the buttons to add to a string. I evaluate that string and then make it a string again, and push out the result.

I hope to make it look better soon. :)

Show your support

Clapping shows how much you appreciated Gordon Davidescu’s story.