Skip to content

Conversation

@stargazer4
Copy link
Contributor

This pull request introduces the power operation to the calculator application. The changes include adding the power function to the calculation methods in the server-side controller, adding a case for the power operation in the client-side JavaScript, and adding a button for the power operation in the HTML user interface.

Server-side changes:

  • api/controller.js: Added the 'power' function to the list of calculation methods in exports.calculate. This function uses the Math.pow method to calculate the result of raising the first argument to the power of the second.

Client-side changes:

  • public/client.js: Added a case for the '^' operation in the calculate function. When this operation is selected, the URI is updated to include "?operation=power".
  • public/index.html: Added a button that calls operationPressed('^') when clicked. This button allows users to select the power operation.

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