The aim of this project is to improve my skills in Vanilla JavaScript by creating a functional and intuitive calculator. The main objective is to make a calculator that performs basic arithmetic operations such as addition, subtraction, multiplication and division.
The calculator offers a comprehensive suite of functionalities designed for both simplicity and efficiency. Users can currently:
- Perform Basic Arithmetic Operations: Easily execute fundamental mathematical operations such as addition, subtraction, multiplication, and division.
- Sign Inversion: Quickly invert the sign of any given number, allowing for seamless transitions between positive and negative values.
- Percentage Function: Instantly calculate percentages by using the percentage button, simplifying tasks like calculating discounts, tax rates, or any other percentage-based calculations by dividing the number by 100.
- Numeric Keypad Support: Enable support for numeric keypad input, allowing for faster data entry and an improved user experience.
I'm working to enhance the calculator's capabilities. Here's a sneak peek at what's on our development roadmap:
- Operation History: Implement an operation history feature to allow users to view previous calculations, enhancing usability and convenience.
Before you start, make sure you have Node.js installed on your system (preferably the latest version). If you're not sure, run node -v
in your terminal to check your Node.js version. If you don't already have Node.js installed, you can download it from the official Node.js website. I recommend using the latest LTS (Long Term Support) version.
To install the project, follow these steps:
$ git clone [email protected]:julienhouyet/javascript-calculator.git
Navigate into the project directory
$ cd javascript-calculator
Install the dependencies :
$ npm install
Once the installation is complete, you're ready to run the project.
To start the project, run this command :
$ npm run start
The application will then be available at http://localhost:5173 (or a different port if 5173 is in use, which will be indicated in your terminal).
Build the project for production:
$ npm run build
Preview the production build:
$ npm run preview
- JavaScript - The programming language used
- Tailwind CSS - A utility-first CSS framework
- Vite - Frontend build tool
For version management, this project adheres to Semantic Versioning (SemVer). This approach ensures that version numbers are assigned in a meaningful way, reflecting the nature of changes between releases.
You can find a detailed version history on the Releases page of this repository.
To see a list of recent changes, go to CHANGELOG.md.