This commit is contained in:
octopusGarden 2022-11-07 11:13:06 -05:00
commit 6583a7abf0
1 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,7 @@ const multiply = function(numList) {
return total;
};
<<<<<<< HEAD
const power = function(num, power) {
//empty variable for total
let total = 1;
@ -37,6 +38,16 @@ const power = function(num, power) {
total *= num;
}
return total;
=======
const power = function(num, pow) {
let total = 1;
for (i=0; i<pow; i++) {
total *= num;
}
return total;
>>>>>>> 0c51ad1a2bf2379e6c83b344ac96ac708d94db1a
};
const factorial = function(num) {