skip to main content

Johan Meester : Portfolio : Front-End Developer

JavaScript Calculator

A freeCodeCamp challenge for building a JavaScript Calculator
Presentation showing how the JavaScript Calculator project looks on mobile, tablet and desktop screens

Objective

Build a CodePen.io app that is functionally similar to this.

User Stories

  • I can add, subtract, multiply and divide two numbers.
  • I can clear the input field with a clear button.
  • I can keep chaining mathematical operations together until I hit the equal button, and the calculator will tell me the correct output.

Note On Calculator Logic: This calculator uses Immediate Execution Logic.

EXAMPLE: 3 + 5 x 6 - 2 / 4 =

Immediate Execution Logic: 11.5
Formula/Expression Logic: 32.5

Also have a look here: