Skip to content

Commit 4ec45fc

Browse files
author
kundan kumar
committed
recursive alog to calculate exponential
1 parent d4bf02f commit 4ec45fc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎Maths/RecursiveExponential.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
let recursiveExponential = (x,n) => {
2+
if(n == 0){
3+
return 1;
4+
}
5+
return x * recursiveExponential(x,n-1);
6+
}

0 commit comments

Comments
 (0)