Giter Club home page Giter Club logo

calc's Introduction

Calculator project

Live page can be seen at: https://orzcode.github.io/calc/

What is there to be said? This is a calculator app / project made using Javascript.

This app was easier to create than one might expect from a calculator, but did involve some lateral thinking when it came to chained / consecutive equations (i.e: pressing another 'operator' such as plus/minus in concussion, instead of having to press 'equals' after every single equation).

The biggest questions this project raised for me were in regards to 'rules' of calculators - beyond the physical maths itself, how should calculators behave? If you press a number button after completing an equation, should it show the number you pressed, or should it add the number you pressed to the number that is currently displayed? If the former - which is probably the standard - then what about if you press the decimal key - should it show "0.x" or should it add a decimal to the displayed number? Etcetera etcetera. In the end, I decided that this was my calculator and largely decided on these things based on what I like in a calculator and how I think is the best way for them to behave.

Having said that - this is not a super advanced calculator. Nor is it designed to be.

Plenty of console.log statements were used to diagnose certain issues and for future sustainability these have been left (as they will not be visible to the average user).

Includes a custom darkmode toggle and numpad support, which was beyond the goals of the project but were definitely nice-to-haves.

Future feature roadmap:

  • Re-arrange top-level elements such as button, on mobile, so it becomes single-screen
  • Add a “backspace” button, so the user can undo if they click the wrong number.
  • Add calculation history
  • Add extra functions such as percentages, etcetera.

calc's People

Contributors

orzcode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.