I have something like this:
function recurse(a){
for(i = a; i < 3; i++){
alert(i);
if(i == 0){
recurse(++a);
}
}
}
recurse(0);
the output that i would expect is 0 (calls the new function) 1, 2 (ends the second function called), and then finishes the first run of the function with 1 and 2. But instead it only alert 0,1 and 2 once and it finishes.