Guest User

Untitled

a guest
Dec 11th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. //This factorial program works for positive integer numbers
  2. function factorial(num) {
  3. if (num === 0) return 1;
  4. else return num * factorial(num - 1);
  5. }
  6.  
  7. factorial(6);
Add Comment
Please, Sign In to add comment