Giter VIP home page Giter VIP logo

js-calculator's Introduction

Art Gallery Redesign

Table of contents

Overview

Created a functional calculator using JavaScript

The challenge

Users should be able to:

  • Use the calculator to solve mathematical equations that involve adding, subtracting, dividing, and multiplying.
  • Press the AC (All Clear) button to clear the numbers currently on display

Screenshot

Links

My process

  • I followed along with the Web Dev Simplified tutorial to layout out my html and css.
  • I added my own design elements such as shadows, new fonts and color style choices as well as an inverse shadow to make my buttons look like they were being pressed.
  • Then we set up the JavaScript file by setting up our variables and creating classes to store the numbers that would be used.
  • I had to define the functions that the calculator could do (clear numbers, add, multiply, etc) by creating a calculator variable that would update those functions.
  • All the while working on getting JS to properly append numbers together and then implementing compute, clear and delete.
  • I paused frequently to test my code along the way on my live server

Built with

  • HTML
  • CSS Grid
  • Javascript

What I learned

  • This was another great practice at using JavaScript, I learned about how to set up functions for mathematical equations and rewrite my code to make corrects. For example letting JS know how to properly append numbers (1+1 = 2 instead of combining them into 1+1 = 11).

Continued development

  • I plan on taking more JS courses and watching several other tutorials. My goal is to not only revisit this practice and look at it from a more developed eye, but also try it completely on my own without the tutorial.

Useful resources

js-calculator's People

Contributors

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