Is javascript single-threaded?
<p>Is javascript running on single thread? If I declare a global array, and start changing it (eg removing elements) on AJAX callback and at the same time start changing the very same array in another function (called with SetTimeOut) - is there a risk of a race condition? </p>

<p>I found this thread: <a href="http://stackoverflow.com/questions/426805/javascript-race-condition">javascript race condition</a>, someone said race conditions never happen in javascript because it always runs in single thread and single callstack. Does this depend on how browser implements it or is it guaranteed to be always single-threaded on all browsers?</p>
