@mei "Multithreading" in JavaScript is only possible through the Worker API, which executes a script (by URL or stringified code) in a new V8 runtime (process) in node, and various levels of isolation in browsers.
How the Worker API is implemented is defined somewhere deep in the weeds of the engine, but it has the same effect as just fork, execv into a new runtime, and a couple extra steps to set up the default messaging channels and some global constants.