0
I don't understand this code. Not from lack of trying. From a challenge question.
2 odpowiedzi
+ 5
var a = (function func(num){
if(num==0) return 1;
return 1 + func(num-1);
})(3);
a
func(3)
1 + func(2)
1 + (1 + func(1))
1 + (1 + (1 + func(0)))
1 + (1 + (1 + 1))
4
+ 1
Thank You. simplified beautifully.