This is a recursive function, and IE and Chrome have different Javascript rendering mechanisms. (Chrome uses V8). Most likely, these are a few inconsequential details about the internal components of a particular engine. In this case, it refers to the size of the stack (how many times something can be recursively called before it "explodes").
Another thing to think about is that for regular programs itโs not so often to enter the call stack unless you think or do it on purpose, as your example above.
When I say "deep", I mean the fact that the evaluated operator (your function) should return a value, and if it does not (and instead calls another nested function), it should evaluate that the first. So it goes deeper. In your example, it will never be able to get the return value of anything until the free space runs out, because the innermost function never returns anything.
Here is another example:
add(1, add(5, add(10, 20)))
In this pseudo-code example, the add function takes 2 arguments, adds 2 numbers. The second argument must first be evaluated before it can get the return value (so that it can add it to 1). So ... it "pauses" the execution of 1 + ... , and then runs the second add function, which does the same. Now you have 2 functions that are 1 + ... , basically awaiting "hold". Finally, the innermost function returns 30 , so it gets 5 + 30 , which is 35, and now 35 goes to the remaining 1 + ... function to complete the calculation.
You might think that the depth of the stack is 3 (simple).
Basically, in your program, it does not get this final return value (to then pass the chain of calls). Instead, he simply leaves space and dies. Therefore, you simply check the limits of the various javascript engines and when they prefer to die.