+ 5

Any experienced Javascript programmers here please ?

Usually, when challenging, I get to see quizzes that I consider very confusing. The most confusing of them all to me are quizzes such as this: function foo(x) { if(x <= 2) { return x; } else { return foo(6) + foo(x + 2) } } foo(8); I can't recall how many times I've seen such quizzes and missed them. I would appreciate it, if you better coders could throw more light on the quiz above 👆 👆

2nd Jun 2018, 4:14 PM
Dlite
Dlite - avatar
7 Respuestas
+ 2
Andre Daniel challenges are available only on android and ios versions of this app tab with thunder sign is where you will find challenge. click on + button at right bottom-> select language and you are up
2nd Jun 2018, 4:26 PM
‎ ‏‏‎Anonymous Guy
0
What exactly is the question? I have not done any quizzes so far, and I don't know where to find them (or where to find challenges) but this looks pretty straightforward.
2nd Jun 2018, 4:17 PM
Andre Daniel
Andre Daniel - avatar
0
When challenging, you'll most likely come across questions like that one up there. I'm asking you guys to help me explain that quiz above
2nd Jun 2018, 4:20 PM
Dlite
Dlite - avatar
0
infinite recursion
2nd Jun 2018, 4:21 PM
‎ ‏‏‎Anonymous Guy
0
I don't understand. Could you please explain it to me?
2nd Jun 2018, 4:25 PM
Dlite
Dlite - avatar
0
So what happens to foo(x+2) ?
2nd Jun 2018, 4:41 PM
Dlite
Dlite - avatar
0
8+2 then x=10 10+2 then x=12
2nd Jun 2018, 4:46 PM
‎ ‏‏‎Anonymous Guy