1
JavaScriptAdvanced#es6
Synchronous code runs line by line and blocks the single thread. Asynchronous code hands work to the browser or runtime and continues, resuming later through callbacks, promises or await.
// blocking
while (Date.now() < end) {}
// non blocking
setTimeout(work, 0);