try this out - can anyone explain why you get "undefined", "11"???
[tt]
function foo(o) {
alert(bar())
}
function bar() {
self.x = self.x ? self.x : 0;
if (++self.x >= 10) return self.x;
else bar();
}
foo();
foo();
[/tt]
=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
[tt]
function foo(o) {
alert(bar())
}
function bar() {
self.x = self.x ? self.x : 0;
if (++self.x >= 10) return self.x;
else bar();
}
foo();
foo();
[/tt]
=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff