Quotes help make search much faster. Example: "Practice Makes Perfect"

Monday, December 3, 2012

Codecademy: Codeyear Recursive: Part 3


//sample solution


var power = function(base, exponent){
if(exponent===0){
return 1;
} else {
return base * power(base, exponent - 1);
}
};
//check
console.log(power(2,3));

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts