Tell us what’s happening:
Its working and checks all the requirements so far but I cannot get past the challenge. I will try something else but whats wrong with this?
Your code so far
var nums = [];
var result = 0;
function factorialize(num) {
for (var i = 1; i < num + 1; i++) {
nums.push(i);
}
if (num > 1) {
result = nums.reduce(function(a, b) {
return a * b;
}, 1);
return result; } else {
return 1;
} }
factorialize(20);
**Your browser information:**
Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36```.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/factorialize-a-number
[details="Summary"]
This text will be hidden
[/details]