Skip to content

Instantly share code, notes, and snippets.

@BolajiOlajide
Last active April 10, 2017 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BolajiOlajide/569974d99b08b00acdbc99b7fb0de774 to your computer and use it in GitHub Desktop.
Save BolajiOlajide/569974d99b08b00acdbc99b7fb0de774 to your computer and use it in GitHub Desktop.
Recursice Javascript Function
function power(a,b){
if (b === 0){
return 1
}
else if (a === 0){
return 0
}
else{
return a * power(a,b-1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment