I've been struggling with wrapping my head around asynchronous programming with callbacks, promises and async/await in JS, however I think it's finally clicking after watching these YouTube videos and creating a document where I explain these concepts as if I'm teaching them to someone else:
Edit... I've been rewatching these videos, reading the MDN docs, the Eloquent JavaScript book, javascript.info, blogs about the subject, etc. This further proves you shouldn't limit yourself to a single resource, and instead fill up the laguna with water from different sources if you will.
* Philip Roberts's What the heck is the event loop anyway? - https://www.youtube.com/watch?v=8aGhZQkoFbQ
* The Story of Asynchronous JavaScript - https://www.youtube.com/watch?v=rivBfgaEyWQ
* JavaScript Callbacks, Promises, and Async / Await Explained - https://www.youtube.com/watch?v=JRNToFh3hxU
* Async Javascript Tutorial For Beginners (Callbacks, Promises, Async Await). - https://www.youtube.com/watch?v=_8gHHBlbziw
* Jake Archibald: In The Loop - setTimeout, micro tasks, requestAnimationFrame, requestIdleCallback, - https://www.youtube.com/watch?v=cCOL7MC4Pl0
Edit... I've been rewatching these videos, reading the MDN docs, the Eloquent JavaScript book, javascript.info, blogs about the subject, etc. This further proves you shouldn't limit yourself to a single resource, and instead fill up the laguna with water from different sources if you will.