Does Javascript support multithreading?


Possible Duplicate:
Why doesn't JavaScript support multithreading?

Is there some way to spawn new threads for running tasks (for network stuff or some heavy calculations) to work in parallel?

Yes and no.

You can use Web Workers to create background threads, but it's far from all browsers that support that. Internet Explorer for example doesn't have support for it until version 10.

In regular Javascript code there is no multi threading. Javascript is a strictly single threaded language.