recursive function without recursive prompt

I’m trying to call recursive factorial function in javascript, but prompt keeps on going.

function recursiveFactorial() {
        var a = parseInt(prompt("Enter a Number: "));
        if (a === 0) {
            return 1;
        } else {
            facValue = (a * recursiveFactorial(a - 1));

        }
        alert("The factorial of " + a + " is: " + facValue);

}