Skip to content

Commit

Permalink
Merge pull request #9 from Wilcolab/copilot3
Browse files Browse the repository at this point in the history
feat: add power operation to calculator
  • Loading branch information
peterszekeli authored Oct 30, 2024
2 parents 2d0ff47 + ccf0c67 commit 8e86914
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports.calculate = function(req, res) {
'subtract': function(a, b) { return a - b },
'multiply': function(a, b) { return a * b },
'divide': function(a, b) { return a / b },
'power': function(a, b) { return Math.pow(a, b) }
};

if (!req.query.operation) {
Expand Down

0 comments on commit 8e86914

Please sign in to comment.