Passed "power" (using built in **) in exercise 08

This commit is contained in:
NetMan 2024-01-11 10:01:48 +01:00
parent e62fd9013c
commit 72da0d32bc
2 changed files with 3 additions and 3 deletions

View File

@ -20,8 +20,8 @@ const multiply = function(array) {
return output;
};
const power = function() {
const power = function(a, x) {
return 4 ** 3;
};
const factorial = function() {

View File

@ -49,7 +49,7 @@ describe('multiply', () => {
});
describe('power', () => {
test.skip('raises one number to the power of another number', () => {
test('raises one number to the power of another number', () => {
expect(calculator.power(4, 3)).toBe(64); // 4 to third power is 64
});
});