Javascript Recursion. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
30th Jul 2018, 8:47 AM
į Œį ŒBrains[Abidemi]
į Œį ŒBrains[Abidemi] - 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
į Œį ŒBrains[Abidemi]
į Œį ŒBrains[Abidemi] - 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