Created
October 25, 2017 09:41
-
-
Save abdulhalim-cu/707bf47fb9e855375d824040cafe95a7 to your computer and use it in GitHub Desktop.
This file contains 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
function power(base, exponent){ | |
if (exponent == 0) | |
return 1; | |
else | |
return base * power(base, exponent-1); | |
} | |
console.log(power(5, 6)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment