Function clarification

I have doubt the below for loop

function f(i){
  if (i < 0) {
    return;
  }
  console.log('Begin '+i);
  f(i - 1);
  console.log('end'+i);
}

f(3)

I understand the first console.log statement. But I am not understand the second console.log. Could any one explain the second console.

There is no loop. It is a recursive function.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.