Open Console to see the results.
Even if your browser supports proper tail calls, this example does not works.
"use strict"; function fact(n) { if (n === 0) { return 1; } return n * fact(n - 1); }