Factorialize using array reducer

Link to the challenge.

Here is my code that doesn’t work:

function factorialize(num) {
if (num <= 1) {
  return [1];
else {
  const reducFactorial = (total, value) => total * value;
  const facArray = factorialize(num - 1);
  return facArray.reduce(reducFactorial);

Can someone explain to me why this won’t work?

Well for one,

And you’re returning array when num <= 1.

1 !== [1]

Hi @SassyFatCat

I believe your not looping your numbers, and also in that loop you need to initialize to 1. not 0.
later you can push them into an empty array, if the entering number its grater than 0 add to array else if its equal to 0 you need to return 1.

Then you can do the Reduction with is the first two arguments(accumulator, currentValue);

Here is a short description of how to use reduce();