The natural way to handle eventuality in JavaScript is with callbacks. Unfortunately, inadequately trained coders created Callback Hell. So Promises were added, and then Async Await. That has made things worse.
https://www.youtube.com/watch?v=e3Nh350b6S4
Welcome to the 8th Layer of Madness Most topics are related to Linux, Anime, Music, Software and maaaany more