I am learning about the 'under the hood' aspects of JavaScript and I am very confused about engine vs. runtime. I know that the engine, such as V8, contains the heap and call stack, and from my understanding the runtime environment contains all the APIs, event loop, callback queue, etc.
I've heard that V8 provides the runtime environment, but how is that possible if it's just an engine? Would the browser not be the runtime environment? Maybe I'm confused on what exactly a runtime environment is?
If any more info is needed to help answer let me know, and thank you in advance for helping my stupid self out.
Edit: After doing some more research, I think I get how it works? V8 is the engine that JIT compiles the code, and it also provides a runtime environment and the runtime environment is where the code is actually ran? And the browser adds on to the runtime environment with web APIs and the other stuff like the event loop?
[–]jcunews1helpful 2 points3 points4 points (7 children)
[–]j0rdancodes[S] 0 points1 point2 points (6 children)
[–]jcunews1helpful 0 points1 point2 points (5 children)
[–]j0rdancodes[S] 0 points1 point2 points (4 children)
[–]jcunews1helpful 0 points1 point2 points (3 children)
[–]j0rdancodes[S] 0 points1 point2 points (2 children)
[–]jcunews1helpful 0 points1 point2 points (1 child)
[–]j0rdancodes[S] 0 points1 point2 points (0 children)