Skip to content

natccc/foundations-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Calculator โ€” The Odin Project Foundation Capstone

Calculator Demo

This project is the capstone for The Odin Project Foundation module.
Itโ€™s a simple calculator built entirely from HTML, CSS, and JavaScript โ€” no libraries, no frameworks.


๐Ÿš€ Features

  • UI built with Flexbox โ€” arranging the buttons and display was fun and helped solidify my layout skills.
  • State management for operands and operators โ€” handles multiple operations in sequence (chained calculations) without needing to clear between each one.
  • Smart number formatting โ€” large, small, and long decimal numbers are displayed neatly using toExponential() and toPrecision().

๐ŸŽฏ Challenges

  • Managing state so the calculator works correctly for chained operations.
  • Preventing display overflow while keeping results accurate and readable.
  • Handling a mix of integers, decimals, and scientific notation without breaking the UI.

๐Ÿ’ป How to Use

  1. Click the on-screen buttons to enter numbers and operators.
  2. Perform a calculation:
    • Example: 12 ร— 3 = 36
  3. Continue calculations without clearing โ€” results are carried forward automatically.
  4. Use the AC button to reset the calculator.

๐Ÿ“š Reflection

This was a challenging but rewarding project that pulled together everything Iโ€™ve learned in this module โ€” from JavaScript logic to CSS layout and DOM manipulation.
It was a great test of my ability to manage state, format output dynamically, and make the UI responsive and user-friendly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published