You can view the live preview of the project here:
SolveX Advanced Calculator
This project is a JavaScript-based calculator application that allows users to perform basic arithmetic operations, create variables, and store calculation history. The application is designed with a web-based interface and includes features such as keyboard interaction and input validation.
- Calculator Functionality: Users can perform arithmetic operations like addition, subtraction, multiplication, and division.
- Variable Creation: Users can create variables with specific names and values to be used in calculations.
- History Management: The application stores the results of calculations in a history table, allowing users to review past computations.
- Keyboard Interaction: Users can use the keyboard to trigger calculations and clear operations.
- Input Validation: Input fields are validated to ensure only valid characters are entered.
index.html
: Contains the structure of the web application, including input fields for the calculator and variable creation.style.css
: Provides the styling for the application, ensuring a responsive and visually appealing interface.index.js
: Contains the JavaScript logic for the calculator's operations, event handling, and input validation.
- calculate(): Handles button clicks for performing calculations and clearing input.
- equals(): Evaluates the current expression in the input field and displays the result.
- check(): Validates variable names and prevents duplicates.
- addrow(): Adds a new row to the history table with the current calculation result.
- deleterow(): Removes a row from the history table.
- addinput(): Adds the clicked history result back to the calculator input for further calculations.
Clone the repository to your local machine.
- Clone the repository:
git clone https://github.com/salmanrafiqq/PocketEscape
- Open
index.html
in a web browser to run the application. - Use the input fields and buttons to perform calculations and manage variables.
- Implement more advanced mathematical functions.
- Improve input validation with more comprehensive error handling.