Skip to content

Instantly share code, notes, and snippets.

@luisafvaca
Created February 19, 2021 14:11
Show Gist options
  • Save luisafvaca/077c6e09ce1a8f891ae2622fc97925dc to your computer and use it in GitHub Desktop.
Save luisafvaca/077c6e09ce1a8f891ae2622fc97925dc to your computer and use it in GitHub Desktop.
Event Loop
/* Considering this code and say what is the output */
(function wtf() {
console.log("Hi 🦊");
console.log("this is a little overview")
setTimeout(function(){ console.log("wtf!") }, 3000);
setTimeout(function(){ console.log("Maybe you think that it is the trick") }, 0);
console.log("because, all javascript things have a fun explanation")
})()
//Hi 🦊
//this is a little overview
//because, all javascript things have a fun explanation
//Maybe you think that it is the trick
//wtf!
// please check this video and learn more about evenloop (Event Loop: Entender el asincronismo en JavaScript) https://www.youtube.com/watch?v=7GeDNQRQy0Y&t=888s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment