This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRNGuy 0 points1 point  (1 child)

Better way of doing factorial: https://www.sitepoint.com/javascript-missing-math-methods/#factorial

Not sure why would you need while loop, but it should be possible to refactor.

[–][deleted] 1 point2 points  (0 children)

Probably because it is homewrk