var pow= function (x, n){
if( n !== 1 ) {
return (x * pow(x, n-1));
} else {
return x;
}
};
console.log(pow(3, 3)); // 3**3 = 27
Last active
November 9, 2017 12:54
-
-
Save RinatValiullov/aeb047cb4edf95ea9b8667be1eae00b2 to your computer and use it in GitHub Desktop.
JS Bin// source http://jsbin.com/zemucav
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment