- #1
mindauggas
- 127
- 0
write an if statement that checks if the parameter exponent is 0. If it is, return 1 (a base case).
It does not work, ca anyone tell why?
Code:
var power = function(exponent, base){
if (exponent === 0){
return 1;
}
};
power();
It does not work, ca anyone tell why?