gracemorganmaxwell / JS-Calculator

JS Calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS-Calculator

Welcome to the Calculator project! This project is a simple calculator that can perform basic arithmetic operations like addition, subtraction, multiplication, and addition. I first created this Calculator project back in 2021. I've come back to it and given it a spruce-up by making the JS code more tider and adding in Jest Unit Testing.

How to use the Calculator

To use the calculator, follow these steps:

  1. Open the index.html file in your web browser.
  2. Use the buttons on the calculator to enter the numbers and operations you want to perform.
  3. The calculator will diaplay the result of your calculation in the output field.

How to Test the Calculator

We have used Jest to test the functionality of the calculator featrure of this website.Jest is a testing framework that ensures that the code works as expected and reduces the likelihood of bugs or errors.

To run the tests, follow these steps:

  1. Open the project in your code editor.
  2. Open a terminal window and navigate to the project directory.
  3. Run the command npm install to install the necessary dependancies.
  4. Run the command npm test to run the tests.

Thank you for using my Calculator project. We hope it helps you with your arithmetic calculations.

About

JS Calculator


Languages

Language:HTML 56.9%Language:JavaScript 31.3%Language:CSS 11.8%