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 👀
- 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
- JS
- CSS
- HTML
- Visual Studio Code
- Git & GitHub
- macOS Terminal
- 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
- 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