var foo = function foo() { if ( whatever ) { foo(); } else { bar(); } };