Skip to content

A simple Calculator which performs basic mathematical operations like addition, subtraction , multiplication, division. Developed as a part of front-end mentor challenge.

Notifications You must be signed in to change notification settings

vaishak10/calculator-app-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator app solution

Table of contents

  • Overview A simple Calculator which performs basic mathematical operations (addition, subtraction , multication, division).

    One additional feature added to this is to get square root of a number individually and also get square root of a number in mathematical expressions.

    DEL button in this calculator is just to erase the previous values .To clear the entire expression it's preffered to click on the RESET button.

    The Keypad is operated by click events as well as Keyboard events. Butkeyboard events have some changes with respect to buttons which will be explained in the note section in the UI.

  • My process

    In the process of making this calculator ,I have made sure the code is not repeated in the javascript file for setting styles for each of the theme's.

    For the Calculations part, Made sure the string expression has been evaluated using window.Function() instead of eval(). Read in some documentations that eval() has some security issues. For more detailed information about this, read the mdn documentation (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval).

    • Built with

      UI is built in a responsive way using HTML , CSS styles and CSS grids, DOM. Controllers carrying out logical operations have been developed using vanilla javascript.

    • What I learned

      Building this Calculator was all about learning many concepts I was never familiar about and also implementing some of the features I had come across in past few months.

      The best part about developing this was writing more efficient and modular pieces of code ,and another one being the need to create responsive applications.

      From DOM manipulations ,To writing functions which can be re-used n number of times . From making use of CSS grids for reponsive interface to changing themes on the basis of a click and much more. A good learning experience.

    • Continued development

      I do want to add more features in this Calculator, make it bit like a scientific calculator with features to make complex mathematical operations.

      Currently this calculator works on click event i.e., we need to click on the buttons on the keypad using mouse . Want to make sure that along with this feature ,can add keyboard events such that user can operate the keypad from the comfort of the user's keyboard.

    *** Update on keyboard events ***

    The keyboard events feature has been introduced , but there have been some minor changes on which buttons to be used. Refer the note section of the UI which is placed below the calculator.

  • Author

    Vaishak.K

    GitHub: https://github.com/vaishak10 Twitter: https://twitter.com/noob_devv

  • Acknowledgments

    This Calculator is a part of challenge by https://www.frontendmentor.io/challenges .They provide alot of challenges (from developing simple templates to developing dynamic web applications) which enchances a individuals project developing skills ,which is a must as one needs to build more and more projects to be a good Developer.

About

A simple Calculator which performs basic mathematical operations like addition, subtraction , multiplication, division. Developed as a part of front-end mentor challenge.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published