How does Javascript work and what is the Execution context? Everything inside javascript happens inside the Execution context. The execution context has two parts (i)memory component (also known as Variable environment ) and (ii)code component (also known as Thread of execution). The memory component stores a key-value pair. For example Key: a Value:10. In the code component, code is executed…