I know the basic concept of recursion, i.e. a function that calls itself recursion.
Now I went through the NodeJS documentation , I found something called Direct Recursion and Mutual Recursion . I found wikipedia documentation on mutual recursion. But you donβt know how this works with JavaScript. I have the following recursion questions.
Is this an example of direct recursion ?:
function abc(num,sum){
if(num<=0) return sum;
return abc(--num,sum);
}
source
share