cachaito
1/9/2016 - 11:28 PM

Inner names of function

var fac = function me(n) {
    if (n > 0) {
        // Use inner name `me` to
        // refer to the function
        return n * me(n-1);
    } else {
        return 1;
    }
};
console.log(fac(3)); // 6