To build great software we should have deep enough understanding of the internals. There are so many developers who don't have any idea of what is going on “under the covers”.
Before we begin, here is a fact for you:
Depending on the context, the runtime environment can take on different forms; for example, the runtime environment in a browser is very different from that of Node.js. Because these differences are primarily at the implementation level, the majority of the following concepts remain applicable.
Example, Chrome uses the V8 JS engine which has been developed by the Chromium Project. Firefox uses SpiderMonkey which was first written by Brendan Eich at Netscape and is now maintained by the folks at Mozilla. Apple's Safari uses Webkit.
JS Engine is made up of the heap and the call stack
The heap, also called the ‘memory heap’, is a section of unstructured memory that is used for the allocation of objects and variables.
The call stack is a data structure that tracks where we are in the programme and operates on a last-in, first-out basis. Each entry in the stack is referred to as a stack frame. This means that the engine is focused on the frame at the top of the stack, and it will not move on to the next function unless the function above it is removed from the stack.
Electron is also a runtime environment used for creating Desktop Applications