How would I make a factorial calculator function?
RohilPatel

How would I make a factorial calculator function? I need that to make a permutations and combinations calculator. I am pretty sure you would need a loop of some sort, but I'm not sure how to do it. Thanks for the help!

You are viewing a single comment. View All
[deleted]

have you tried googling? I found this quite easily: https://www.sitesbay.com/javascript/javascript-factorial-of-number
Do you know about recursion? It can be used instead of a loop: https://www.w3resource.com/javascript-exercises/javascript-recursion-function-exercise-1.php

RohilPatel

Sort of but not much luck , @malvoliothegood