In this series I attempt to complete Free Code Camp as quickly as possible, without cutting too many corners. For an introduction to this series, see Free Code Camp #0: Speedrunning Free Code Camp.

I have now completed the challenge Build a JavaScript calculator. Initially I tried making a calculator emulating a real calculator, but I gave up and resorted to eval. For the design I tried to imitate the "material" look that is so popular nowadays. You can see the result in this CodePen:

See the Pen Free Code Camp: Build a JavaScript Calculator by Andreas Røssland (@roessland) on CodePen.

Try evaluating an invalid expression such as "5++-" for a nice error indicator.

Screenshot of calculator.