Is this an example of recursion in JavaScript?

Viewed 76

I'm currently a bit befuddled... I'm tasked with finding the value of x, is this an example of recursion? I am not asking for a straight answer for the value of x, I can find that out with some guidance from the Overflow community. I get confused at a = b, and b = t, then where is says return the function.

Any and all help is greatly appreciated!

function f(a, b, c) {
  if (c > 1) {
    c = c - 1;
    var t = a + b;
    a = b;
    b = t;
    return f(a, b, c);
  }
  return a + b;
}
var x = f(1, 3, 4);
4 Answers
Related