DEV Community

Discussion on: How JavaScript Works🔥 🤖 [Visually Explained]

Collapse
 
narottam04 profile image
Narottam04

when an execution context is destroyed, it destroys the variable and functions defined inside them. Unless you take into account the concept of closure, but generally it will be destoryed. If the variables is not destroyed it will clog our memory in the browser.