Does JavaScript use stack or heap for memory allocation or both?
Does JavaScript uses stack or heap for memory allocation or both, I know it uses heap for achieving closures. But does it also use stack. What are the use cases for what it uses and when it uses?