Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //10. Factorial Division
- //15 EXERCISE: FUNCTIONS/10. Factorial Division.js
- function factorialDivision(n1, n2) {
- 'use strict'
- const rFact = num => {
- if (num === 0) {
- return 1
- }
- else {
- return num * rFact(num - 1)
- }
- }
- let f1 = rFact(n1)
- let f2 = rFact(n2)
- console.log((f1/f2).toFixed(2))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement