Skip to content
Advertisement

How to make a script which outputs the ratio of the factorials of two numbers (N! / M!)?

I have a code that find n factorial:

JavaScript

but, how can I find the ratio of the factorials of two numbers (N! / M!)?

Advertisement

Answer

You can add a return in you function and call her 2 times:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement