About the Call Stack, Event Loop, Callbacks and Promises in JavaScript
HTML-код
- Опубликовано: 12 сен 2024
- In this episode we talk about the JavaScript call stack, asynchronous callback functions, and create a Multi Stage Promise Chain using data from the Spotify Web API.
Key technologies we will touch are:
* Fetch API
* Promise API
* Array.map() and Array.forEach()
* setTimeout()
Source code:
github.com/met...
Music:
Demoscene Time Machine
demoscenetimema...
I wanted you to know that your videos are greatly appreciated even ones like this which are more than a year old. I am a fan of funfunfunction and I just happened to find your Channel and I appreciate the parody. Truth be told I think you are perhaps the best JavaScript programmer posting videos on the internet today. There are several of us still coming up to speed on JavaScript in the Philadelphia Pennsylvania United States region and we watch your videos and learn from them. Some of your recent Mario videos are the best examples of refactoring code I have ever seen. You are a master Craftsman! Thank you for taking the time to make and post these videos. My only complaint would be after I watch your videos I realize how terrible I am at JavaScript. You should consider making a Masters of the Universe JavaScript series and talk about some of the things people fear the most. Every time I watch one of your videos I take away something new and valuable. You are operating at an advanced level and some of the things you do go over my head, but that is what keeps me coming back because I know there is more to learn!
Hello EGW, and thank you soo much for your kind words. It makes me so happy to read that.
Thank you for taking the time to write this to me. It made my day. :D
Thanks for watching!
I absolutely love your videos! They make these things easy and fun to follow. Please come back!
Fun Fun Function...
Meth Meth...aah, I see what you did there :)
Methods are functions, so meth is fun?
Awesome episode!
Top 3 giggles:
1. "Blob blob blob blob"
2. pom in the album id
3. The end
1: 36:26
2: 34:26
3: 40:30
;)
We are all waiting for new videos. Keep doing cool stuff!
I suggest anyone who wants to write super clean/readable async code to check videos on ES8's new async/await standard right away!!
The jump from Promise.then to async/await is as big as the jump from callback hell to Promises!
Furthermore, I'm not sure whether I'm more happy with the learning about the JS concepts or learning about this amazing electro artist!
Last one minute is very awesome...Liked the presentation....Please come with more videos...
Great Video! I was struggling to make a promise chain with angular, but after I watched this video I solved the problem. Thanks =)
Good to hear! Glad I could help. :)
Great use of animations, this is exactly what I was looking for!
These swedes are so good at programming + they really understand it at a deep level. Thanks.
AWESOME!!! Fantastic tut! It would be cool to get a remake of this with Async Await. Thanks for this great resource!
Great stuff! Looking forward to more videos!
Please come back soon!
"blob blob blob blob" that's so funny haha
really nice video , learns a lot from it
Please make more when you have time
Well this was enlightening
I love your channel buddy, keep up the good work!
Hot stuff, congrats.
I encourage you to make more videos like this.
Thanks
This is fabulous! Your animations of the stack frame are great - would there be a way I could use those?
Nice! Specially the last part :)
Haha is your name a parody of funfunfunction or the other way around?
Just wanted to write the same
rot13("Mattias Petter Johansson") = "Znggvnf Crggre Wbunaffba"
coincidence? Well, i'm not sure what that coincides with but either way he's the evil MPJ. He even has a mustache.
It's a parody by name. When Mattias named his show I asked why he didn't call it Meth Meth Method, and when I wanted to do my own the name was a given. I asked for permission. :)
Me too :)
Educational and hilarious!
>blob blob blob
you should consider scrimba dude! you're very easy to listen to and have a great tempo. Scrimba makes it easier to code along :).
Why does the Promise.all just take one second (run all simultaneously)? I thaught, that setTimeout will be „moved“ to a new call stack and JS can proceed just one at the time. Like you showed in the video. So why behaves this different?
EDIT: I got it now: developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop
Subbed for the music!
You should make a video showcasing how to transform the exact same code above using async await :)
If you are a demoscener come to evoke 21 on aug. 17-19th 2018
you teach better than my professor. LOLs.
Incredible
can you do one for TIC TAC TOE for newbies such as myself? There is nothing out there as good as your videos.
Hi Method, can you do an explicit+example video on arrow function?!
Reason:Your explications/examples are very good man!
Thank you
Bro I like to know the brand and name of the glasses you are wearing. They look cool
great beard ( pressed like button ) :)
which keyboard is that?
I believe you can skip the whole "convert from fetch image response to blob" and just append img.src = album.images[0].url
Your nickname on url may be a signal: keep going with your episodies :)
Dude I finally get it now. Thanks. Time to slaughter all those callbacks!.
Using fetch() no longer works for this tutorial. I got error status code 401. You need to have a clientID and clientSecret to get a token from spotify to access the data. I switched to use the spotify-web-api-node. It should be fine like that.
That probably would taken me days to write hahah
Can I download your intro somewhere? I love it!
He protecc
He attacc
But most importantly...
He don't like callbacc
why you stop making videos?
I moved and have no recording environment currently. Eager to jump back on though.
Meth Meth Method Eager to see you again
Just found your channel, you better start making content again soon! :)
I've subscribed.
The Spotify API has change
Emmanuel Valverde Ramos mock it!! :)
Brrrrp
woah...wtf...weed....java....swede....hypnosis();
great content but horrible intro and irritiaiting mechanic keyboard sound
We are all waiting for new videos. Keep doing cool stuff!