Hello there,

Codecademy give the solution below for creating a function that computes a factorial

// Write function below

const factorial = n => {

let result = 1;

for (let i=n; i>0; iā) {

```
result *= i+1;
```

}

return result;

}

But factorial(3) produces 26

instead of 6

Can you explain??