Skip to content

nhutle/js-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A. Folow the instructions step by step to run the project

  1. Install needed dependencies
  • Run the following command to install node modules

    npm install

  1. Run the following command to run the project

    gulp

  2. Open localhost:3000 to see the result.

B. Distribution

  • Run gulp build to build a distribution version.

C. How to use the plugin as a widget

  1. Copy all files in dist folder and place them inside your project.

  2. Embed Calculator's html code to your html file, don't forget to import main.min.js and main.min.css as well.

D. Object Model(UML)

  • Below is how I implement the Calculator in OOP way with JS. class-diagram

E. Live demo

  • Please find the live demo here.

F. Known issues

  • Fail to calculate a mix of operators
    • For example: 3-2*4 should be -5, rather than 4 since I haven't implemented order of operations yet.
  • Lack of many functions: supporting negative numbers, decimal numbers, etc.

About

A simple Calculator with plain HTML, CSS and JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published