This is a simple calculator app built for The Odin Project foundations course.
Create a calculator app with UI (buttons and screen) that will have all of the basic math operations (addition, subtraction, multiplication and division). Calculator should not evaluate more then a single pair of numbers at a time. Do not use built-in eval() function.
ADDITIONAL
Calculator should have keyboard support (with 'Backspace' for delete and 'DEL' for clear) and users should be able to add decimal point.
data-*
attributes- Flex box layout
- Event delegation
- Functional programming
- Parsing float numbers to certain decimal places
- Functional programming
- Using different event types
- How to de-focus an element
Used this Stack Overflow question to find out how to round up float point numbers correctly.
Used this MDN Event documentation to figure out why I needed to use event.blur
and check for event.type
before assigning either event.dataset.value
or event.key