• + 0 comments
    function factorial(num){
        let result = 1;
        for (let x = 1; x<num+1 ;x++ ){
            result = result * x 
        }
        return result
    }