In any non-systems language you don't need to know (and knowing it doesn't help you with anything) this stack sorcery you're talking about.
You can mess with the stack in C, you can also mess with the stack in C#. But you don't have to, and normally you don't. You use it in a completely transparent manner, not caring where the compiler decides to put your data.
When it comes to stack allocation, in C this is the compiler's decision and in JS this is the execution engine's decision.
In JS, that quote makes perfect sense, and the answer is: the engine checks what can be safely put on the stack, and the stuff that is closed over is stored on the heap to avoid losing it when the function returns.