Created
January 20, 2012 16:09
-
-
Save jbfink/1648052 to your computer and use it in GitHub Desktop.
recursive part 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var power = function (base, exponent) { | |
if (exponent === 0) {return 1;} | |
else | |
{ return base * power(base, exponent - 1); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment