variables - Is this an example of recursion in JavaScript? -
i'm bit befuddled... i'm tasked finding value of x, example of recursion? not asking straight answer value of x, can find out guidance overflow community. confused @ = b, , b = t, says return function.
any , appreciated!
function f(a, b, c) { if (c > 1) { c = c - 1; var t = + b; = b; b = t; return f(a, b, c); } return + b; } var x = f(1, 3, 4);
yes, line here: return f(a, b, c)
- recursion calling @ end. it's modifying parameters receives , re-calling again.
Comments
Post a Comment