re: If Javascript Is Single Threaded, How Is It Asynchronous? VIEW POST

re: Hey Eugene, Would you please help me understand how does this happen. Any link or reference would be very helpful. TIA :)

Well, it's a joke and shouldn't be used anywhere in production code.

We iterate on every element (N) in array of numbers and ask a JS engine to log this number in the console after N milliseconds from now. So, these numbers will be logged in a sorted way, because time in our universe flows in one direction 😁

Yes, indeed it's a joke and should not be used anywhere in production. But it's nice to know how things work, It took me some time to figure out but it was worth it.
Thanks 😁

Code of Conduct Report abuse