There\’s no such thing. Correct me if I\’m wrong, but multi-threading in javascript does not exist. But we can simulate it, as is discussed by James Edwards. How does it work?
It all hinges on the use of asynchronous timers. When we run repetitive code inside an asynchronous timer, we’re giving the browser’s script interpreter time to process each iteration.
Continue reading What I Learned About Multi-threading in JavaScript