Calling a javascript function recursively
Using Named Function Expressions: You can give a function expression a name that is actually private and is only visible from inside of the function ifself: var factorial = function myself (n) { if (n <= 1) { return 1; } return n * myself(n-1); } typeof myself === ‘undefined’ Here myself is visible only … Read more