A naive recursive factorial blows the call stack at large inputs. Why does rewriting it in proper tail-call form NOT fix the stack overflow in V8 (Node/Chrome) as of recent versions?
function fact(n, acc = 1) {
if (n <= 1) return acc;
return fact(n - 1, n * acc); // tail position
}
fact(100000);