I decided to build a calculator as an exercise to learn JavaScript. On top of being a good problem to combine JS and DOM-manipulation, it was a fun exercise in algorithms too.
The application runs a recursive algorithm on the given calculation, solving from the 'deepest sub-calculation' to the 'surface'.
Basically, if the calculation is the following: 5+(4/2), the algorithm solves it in the following steps:
5+(4/2) (4/2) 4/2 25+27The app isn't perfect as it has at least one know bug (try entering '+(-)' -- it shouldn't let you enter incorrect inputs) and the ANS feature was added as an afterthought and works like one. Otherwise I'm pretty happy with it, considering the context.
