+ 1

Javascript Recursion.

Hello everyone, Goodday, I need a Well detailed explanation of Javascript Recursive functions, how it works, the concepts and all..(please do not use the factorial, egg chicken examples, I already understand that) Please I’m a beginner... *beginner* 😐 Please kindly explain this example also, as a plus. function xy(x){ function yy(a,b){ if (x==a){ return b; } else if (x<a){ return null; } else { return yy(a+5,`(${b}+5)`)||yy(a*3,`(${b}*3)`); } } return yy(1,"1"); } Thanks..

29th Jul 2018, 7:57 PM
Odus Obafemi
Odus Obafemi - avatar
5 odpowiedzi
30th Jul 2018, 8:47 AM
᠌᠌Code X
᠌᠌Code X - avatar
0
Your code has several levels of nesting and string literals its very hard to even know whats going on
29th Jul 2018, 8:20 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
᠌᠌brains Then what do I need to provide, for you to know what’s going on.. or please you could just give me a clear description of recursion with your own example, a simple and a complex one for better understanding..
29th Jul 2018, 8:46 PM
Odus Obafemi
Odus Obafemi - avatar
0
please, this is the question. “Recursion”.... how it works, give me your example, a well detailed explanation, for me to understand it. *The code i put there is just a plus. thanks.
30th Jul 2018, 8:32 AM
Odus Obafemi
Odus Obafemi - avatar
0
Whosoever you are, please don’t bother to comment, if you don’t have my answer. 😁 also, READ and understand the question before you comment, thanks..😊
30th Jul 2018, 10:24 AM
Odus Obafemi
Odus Obafemi - avatar