Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

factorial function javascript

    function factorial(n) {
        if (n > 1) {
            return n * factorial(n - 1);
        }
        return 1;
    }
 
PREVIOUS NEXT
Tagged: #factorial #function #javascript
ADD COMMENT
Topic
Name
4+8 =