Javascript is a single-threaded language that can be non-blocking. In sync programming, the program is executed line by line, one line at a time. When the call stack sees it needs to fetch an image, it pops and sends it to Web API and continues executing the remaining functions.

2 Comments
Sort: