Factorial Flashcards
1
Q
Write function to find factorial of number?
A
function factorialize(num) { if(num \< 0) { return; } if(num \< 2) { return 1; } return num \* factorialize(num - 1); }
factorialize(5);
Write function to find factorial of number?
function factorialize(num) { if(num \< 0) { return; } if(num \< 2) { return 1; } return num \* factorialize(num - 1); }
factorialize(5);