Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.42 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.42 KB

🧮 Calculator

About the project

Simple browser calculator app, allowing user to add, subtract, multiply and divide numbers using the provided UI.
Created as part of The odin Project Web Development Foundations curriculum.

Live demo 👀

Features

  • Multiple operations supported: add, subtract, multiply, divide
  • Decimal inputs supported
  • Results rounded to three decimal places
  • Clear button for user to start over
  • Back to back calculations supported
  • Error message when trying to divide by 0

Built with

🪄 Technologies

  • JS
  • CSS
  • HTML

🔧 Tools

  • Visual Studio Code
  • Git & GitHub
  • macOS Terminal

💙 Credits

  • Referred to michalosman's project to understand the logic of the user interaction with the calculator, and figure out potential bug scenarios in order to prevent them

Takeaways

  • Learned basics of regex (regular expressions) and how to use them in conditional statements (e.g. if (/[0-9.]/.test(char) {...} )
  • Practiced Math.round() method
  • Practiced printing variables' values in DOM elements
  • Practiced event listeners with button click events
  • Practiced CSS Grid & CSS Flexbox
  • Practiced BEM naming convention for CSS classes