Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pow feature irs #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

pow feature irs #16

wants to merge 1 commit into from

Conversation

stargazer4
Copy link
Contributor

This pull request primarily includes changes to implement a power operation in the calculator application. The changes involve adding the power function to the calculator's operations, updating the client-side JavaScript to handle the new operation, adding a button for the power operation in the HTML interface, and adding a new test suite for subtraction operations.

Here's a breakdown of the most important changes:

New functionality:

  • api/controller.js: Added a power function to the list of operations in the calculate function. This function uses the built-in Math.pow method to calculate the power of the first operand raised to the second operand.
  • public/client.js: Updated the calculate function to handle the new power operation. When the '^' operation is selected, the URI for the request is updated to include the power operation.
  • public/index.html: Added a new button to the calculator interface for the power operation. When this button is clicked, the operationPressed function is called with '^' as the argument.

Test suite expansion:

  • test/arithmetic.test.js: Added a new test suite for the subtraction operation. This suite includes multiple tests to cover various scenarios, such as subtracting two positive integers, subtracting zero from an integer, subtracting a negative integer from a positive integer, and more.

Copy link

@robertefreeman robertefreeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants