Do you guys this is an okay code? Any suggestions for improvement?

```
function factorialize(num) {
var result = 1;
for (var i=num; i >= 1; i--) {
result *= i;
}
return result;
}
```

My solution to Factorialize a Number challenge

0.0
0

Do you guys this is an okay code? Any suggestions for improvement?

```
function factorialize(num) {
var result = 1;
for (var i=num; i >= 1; i--) {
result *= i;
}
return result;
}
```

I used recursion to solve mine, just because I wanted to use it! Point noted. Great post as usual, @P1xt.

Thanks @dpberry552. I am glad these algorithm challenges arenโt as difficult as I feared them to be

**Easy to understand **

```
function factorialize(num) {
var result = 1; // set to 1 because multiplying to 0 results in 0
for(i=1; i<=num; i++){ // get 1,2,3,4,5
console.log(result *= i); // multiply 1*2*3*4*5*(1) = 120
}
}
factorialize(4);
```