Understanding Asynchronous JavaScript
HTML-код
- Опубликовано: 10 сен 2024
- Understanding asynchronous JavaScript is an important concept. This concept leads to a better understanding of callbacks and promises.
For more resources on JavaScript:
www.allthingsja...
Full personalized courses on JavaScript:
allthingsjavasc...
Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:
www.udemy.com/...
www.udemy.com/...
Tutorials referred to in this video:
Understanding JavaScript Callbacks: • Understanding JavaScri...
Amazing pace, clear voice, solid knowledge , mature and patient teaching. Sir , you are an awesome teacher.
Thanks!
This is a very simplistic explanation. The execution of JavaScript is always synchronous from a call stack. What setTimeout does is delay the moment that a callback is pushed into the stack. And it will push into the stack after X milliseconds which means that it will actually be executed after all the stack is done executing. So it may not even be executed after X milliseconds. If this happens on a browser, other tasks may be executed before the callback like Dom rendering for example.
It is async in a way as its not executed in the order of code written.
he he, I watched one video, then each one keeps referencing other videos I should watch first. The rabbit hole goes so deep ha ha - thanks for linking the relevant mentioned videos
Your channel has been a blessing
The best Asynchronous example I ever heard. Thank you, sir
Sir, you are a good instructor glad I found this video. Thank you!
thx from brazil! excelent.
Sir, your explanation is very lucid. I can't thank you enough.
Glad to hear that
Thank you sir
Thank you sir ....am glad you'll do promises next
Thank you from 2021🙂
Thank you! Nobody explains JavaScript better than you! Is there a "async await" video? I wonder if i missed that somewhere.
This is covered in my asynchronous class, but I haven't done a RUclips video on async await yet.
Thank you, it really helped me revising the concept.
Glad it helped!
this is pure gold
nice videos
Thank you :)
Hello, can you please tell me what editor and what theme do you use?
I use sublime text. The theme is the default, which I prefer.
You should give VS Code a try, Oros. In many people's opinion, it's the best available. I've used a dozen or so Editor's over the yrs and a few IDE's, VS Code blows them all away.
I'll have to look at it.
Oh, there's no comparison between it an any other editor. SUblime and Atom can't hold a candle to it. I'd say you'll love it.
Awesome!
Do you cover promises in your course?
Not in the courses that are currently released. I'm working on an Async course that will include promises.
👍nice vid like always. Thanks
Could have been an opportunity to introduce the Event Loop topic and Blocking Threads vs non-blocking threads.
I will add it.
one of your videos is numbered 97 but i cant find the playlist for it.
Here is the playlist for promises that includes 97: ruclips.net/p/PLTo9PCskHpbHIDnzl8tRYldSCSQaFgAHd
Is that what you are looking for?
it's not really the callbacks that makes it asynchronous but its the web APIs like settimeout which makes it asynchronous. its not like you create your own callback and it's magically asynchronous because javascript is songle threaded. the web APIs which aren't coming with the javasript runtime engine but with the browser is what makes thr ehole thing asynchronous
Yes, true. However, without callbacks you couldn't make JavaScript asynchronous even if you had the web APIs. You need something to call back to the JavaScript environment.
Play at 1.25x speed. It sounds like you're purposely talking slower than necessary to lengthen the video duration
This is just a plug. Which I have to say, the guy has 20+ yrs of JS experince and his 'courses' are as weak as yesterdays unfinished can of beer. better of elsewhere if you want to understand callbacks, async