Working for a web company. Our favourite JS question is, "What happens if you do this?" var func = function func () { // blah };
The function is able to reference itself, allowing recursion. This used to cause an error in Safari though, am I right?
var foo = function (n) { return foo(n); }; foo(1);
gives back "too much recursion", not "foo is not defined", in both Spidermonkey (Firefox 24) and V8 (node.js 0.10.something).