The evaluation can be understood like this
j(4)
4 * j(3)
4 * (3 * j(2))
4 * (3 * (2 * j(1)))
4 * (3 * (2 * (1 * j(0)))) // When input to j is 0, returns 2
4 * (3 * (2 * (1 * 2)))
4 * (3 * (2 * 2))
4 * (3 * 4)
4 * 12
48
Till recursion reaches j(0)
, it goes deeper and deeper. But when it reaches it, it begins to unwind the recursion. And the most important thing is,
if (i==0) return 2;
is called the base condition of your recursion.