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

added function #18

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

added function #18

wants to merge 1 commit into from

Conversation

stargazer4
Copy link
Contributor

Enhancements to calculator operations:

  • api/controller.js: Added a new operation 'pow' in the operations object to handle power operations. This function takes two numbers as input and returns the result of the first number raised to the power of the second number.

Frontend updates:

  • public/client.js: Updated the calculate function to handle the '^' operation, which corresponds to the power operation. When the '^' operation is selected, the URI is updated to include the 'pow' operation in the query parameters.
  • public/index.html: Added a new button in the HTML for the power operation. When this button is clicked, the operationPressed function is called with '^' as the argument, triggering 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.

1 participant