An old project built in the first half of 2025 as the start of my journey and posted here to attach to the course's page and to preserve my path.
This project is a part of FreeCodeCamp's Front End Development Libraries Certification. The goal is to build a JavaScript Calculator that allows users to do simple arithmetic calculations.
This project fulfills all 15 user stories from FreeCodeCamp's "Build a JavaScript Calculator" challenge:
Click to expand the full requirements
User Stories:
- Clickable
=element withid="equals" - 10 clickable number elements (0-9) with IDs:
id="zero"throughid="nine" - 4 clickable operator elements with IDs:
id="add",id="subtract",id="multiply",id="divide" - Clickable decimal element with
id="decimal" - Clickable clear element with
id="clear" - Display element with
id="display" - Clear button resets calculator to initialized state (shows
0) - Input is visible in
#displayas numbers are entered - Can add, subtract, multiply, divide chain of numbers —
=shows correct result - Numbers cannot begin with multiple zeros
- Decimal appends
.to current value; two decimals in one number not allowed - Operations work on numbers containing decimal points
- Consecutive operators: last operator entered is used (excluding negative sign)
- Operator immediately after
=starts new calculation on previous result - Reasonable decimal precision (handles
2 / 7to at least 4 decimal places)
All tests passed ✅
- Frontend: React, Vite, CSS
- Build Tool: Vite
- Deployment: GitHub Pages
| JavaScript Calculator Preview |
|---|
![]() |
submitted to FreeCodeCamp on Mar 4, 2025
| Fourth project of my FreeCodeCamp Front End Libraries Certificate journey |
|---|
![]() |

