• + 0 comments

    Here is my solution in TypeScript:

    function extraLongFactorials(n: number): void {
        // Write your code here
        let result = BigInt(n);
        let number = n;
        
        while (number > 1) {
            number = number - 1;
            result = result * BigInt(number);
        }
        
        console.log(result.toString());
    }