Does javascript work on a single thread? If I declare a global array and start changing it (for example, deleting elements) in an AJAX callback and at the same time start changing the same array in another function (called with SetTimeOut) - is there a risk of the race condition?
I found this topic: the state of the javascript race , someone said that race conditions are never in javascript because they always work in the same thread and in a single freeze frame. Does it depend on how the browser implements it or is it guaranteed that it is always single-threaded in all browsers?
source share