Skip to content

🧮 A functional and intuitive calculator in JavaScript Vanilla. The main objective is to make a calculator that performs basic arithmetic operations such as addition, subtraction, multiplication and division.

Notifications You must be signed in to change notification settings

julienhouyet/JavaScript-Calculator

Repository files navigation

Javascript Calculator

Introduction

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.

✨ Current Features

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.

🔜 Upcoming Features

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.

⚡ Usage

🔌 Installation

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 git@github.com:julienhouyet/javascript-calculator.git

Navigate into the project directory

$ cd javascript-calculator

Install the dependencies :

$ npm install

▶️ Running the Project

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).

📦 Other Commands

Build the project for production:

$ npm run build

Preview the production build:

$ npm run preview

📷 Gallery

🛠️ Built With

🏷️ Versioning

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.

📝 Changelog

To see a list of recent changes, go to CHANGELOG.md.

About

🧮 A functional and intuitive calculator in JavaScript Vanilla. The main objective is to make a calculator that performs basic arithmetic operations such as addition, subtraction, multiplication and division.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published