This project involves building a functional JavaScript calculator, which allows users to perform mathematical operations. The calculator can be accessed Here.
The JavaScript calculator is an interactive web application built to perform basic arithmetic calculations. Users can input numbers, apply operators, and calculate results through either clicking on calculator buttons or using keyboard input. The calculator supports a range of mathematical operations and adheres to proper calculation order.
The challenge required building an app similar to this example. The following user stories were fulfilled:
- The calculator should include clickable buttons for digits 0-9.
- Operators (+, -, *, /) should have clickable buttons.
- A clickable button for the decimal point should be available.
- The calculator should have a button to clear the input and output values.
- A clickable button for the equals sign (=) should calculate and display the result.
- The calculator display should show the current input as users interact with it.
- The calculator should handle order of operations and chaining of operations.
- The calculator should handle decimal numbers and precision.
- Pressing an operator immediately after = should continue calculations.
- The calculator should handle zero input limitations and multiple decimals.
The project is built using React and Redux, providing a dynamic and user-friendly interface. The calculator's functionality is achieved through React components and Redux actions, allowing for clear state management and interaction logic. The calculator handles various edge cases, including consecutive operators, decimal input, and zero input scenarios.
- React
- Redux
- Bootstrap (for styling)
To interact with the deployed project, visit my CodePen Project.
This project demonstrates effective use of React and Redux for creating an interactive calculator that performs various arithmetic operations, adheres to order of operations, and handles user input gracefully.