as I mentioned in the post, there are many solutions to the Factorial Algorithm.
I chose those two because I like how self-explanatory is the code in the solution with while method and I like the second one because it's a nice short one-liner.
The one you are mentioning is the same as the second one in the post. The difference is that you are using function declaration/expression instead of an arrow function. With the ES6 arrow function, it's just shorter and a one-liner.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.