thecyberbuzz / anycode

Only Valid Contribution will be Accepted
https://cyberbuzz.vercel.app
MIT License
70 stars 79 forks source link

Adding a functional simple calculator using html,css and javascript #105

Closed parthivghose2919 closed 11 months ago

parthivghose2919 commented 11 months ago

HTML and CSS: The HTML file (index.html) defines the structure of a simple calculator interface. It includes input fields for entering expressions and a result section for displaying the calculated results. The CSS in styles.css provides styling to make the calculator visually appealing.

JavaScript Functions:

clearDisplay(): Clears the input display, presumably for starting a new calculation. deleteLastCharacter(): Deletes the last character from the input display, allowing for correcting mistakes in the input. toggleSign(): Toggles the sign of the current input (positive/negative). appendToDisplay(value): Appends a value to the input display, which is useful for entering numbers and operators. calculate(): Attempts to evaluate the expression in the input display using the eval function. It then displays the result or an error message if the expression is invalid.

parthivghose2919 commented 11 months ago

Hey @thecyberbuzz can you please merge the Pr and label it as Hacktoberfest2023 under the guidelines of Hacktoberfest2023