This javaScript code block is making me crazy,that how it is doing the computation behind. I try to manually do it with calculator but the results start to be different at 4. Please explain if you know how

```
function fac(n) {
  if (n == 0)
    return 1;
  else
    return fac(n - 1) * n;
}

if i run console.log(fac(1));

// > 1

if i run console.log(fac(2));

// > 2

if i run console.log(fac(3));

// > 6

```

i was thinking this is what was happening behind

```
(2-1) * 2 = 2, 
(3-1) * 3 = 6, 

```

until i put 

```
(4-1) * 4 = 12.

if i run console.log(fac(4)); the output is 24 not 12  

// > 24 how and why?

```

cheers