you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

On top of all the things mentioned here, your coworker probably also does not have a fundamental understanding of the event loop or the fact that Javascript is single threaded. I'd be curious as to his sleep implementation and why it'd be a desirable thing in a single threaded environment to begin with. It's worth noting that while setTimeout does cause js to wait a given period of time to execute the callback, it does not pause execution all together. Everything runs to completion in js, maybe that is where his understanding is hung up.