Skip to content

jormaedes/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧮 Calculator

Project developed as part of The Odin Project – Foundations, focused on building a fully functional calculator using HTML, CSS, and Vanilla JavaScript.

This project brings together everything learned in the Foundations path, combining logic, DOM manipulation, event handling, and clean code structure into a single interactive application.


🚀 Demo

You can view the live version of this project here:

🔗 https://jormaedes.github.io/Calculator/


🎯 Project Goals

  • Build a functional calculator from scratch
  • Apply JavaScript logic to handle user input
  • Practice DOM manipulation and event listeners
  • Handle edge cases and invalid operations gracefully

🧠 Concepts Practiced

During this project, I worked extensively with:

  • JavaScript functions and control flow
  • DOM selection and manipulation
  • Event listeners for button interactions
  • String and number conversions
  • State management (current value, previous value, operator)
  • Error handling (division by zero, multiple operators, etc.)

🛠️ Technologies Used

  • HTML5 – semantic structure
  • CSS3 – layout and visual styling
  • Vanilla JavaScript – application logic

📋 Features

  • Basic arithmetic operations:

    • Addition (+)
    • Subtraction (−)
    • Multiplication (×)
    • Division (÷)
  • Clear / reset functionality

  • Decimal number support

  • Display update in real time


📂 Project Structure

Calculator/
├── index.html
├── style.css
├── script.js
└── README.md

▶️ How to Run the Project

  1. Clone the repository:
git clone https://github.com/jormaedes/Calculator.git
  1. Navigate into the project directory:
cd Calculator
  1. Open index.html in your browser

🧩 Challenges Faced

  • Managing calculator state correctly
  • Preventing invalid input sequences
  • Handling decimal numbers properly
  • Implementing chained operations

📈 Possible Future Improvements

  • Keyboard input support
  • Improved UI/UX and animations
  • Calculation history
  • Mobile-first responsive layout

✍️ Author

Jormaedes Luís Software Development Student 42 School | The Odin Project


A capstone-style project in the Foundations path, bringing logic and UI together.

About

Este projecto é um dos projetos do theodinproject.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors