I am a teacher and I know how hard it is to succinctly pass information across. If a teacher can effortlessly demystify a seemingly hard concept, s(he) is an excellent teacher. I confirm that you're an excellent teacher. Please, keep sharing your knowledge.
You're absolutely incredible! Before watching this video, I couldn't undestand the topics you discussed, but now I understand them perfectly. Thank you so much!
I came to your channel to thank you about the detailed explanation because I read the article instead of watching the video and it was one of the best articles I read about an IT concept keep going Mr Tapas
Hey Tapas ! I saw ur video link from the blog at freecodeCamp as such that blog explains pretty much explains everything regarding nested functions being asynchronous while non-nested ones being synchronous , I just came here since i couldn't find a like button so here m linking ur video . Lots of support and convern to U ! Keep up the good work 😇
Man, I don't know why your channel doesn't have more recognition. Thanks for this amazing explanation of event loops! I did more research about it because I didn't understand why the necessity of having 2 different queues, and why 'fetch' being a macrotask, ends up being resolved on the microtask queue (I hope I got it correct). Thanks for all
Hi Tapas, Ive started watching this series after watching some of your videos about React Hooks. I enjoyed the video and the quiz afterwards and I'm looking forward to watching the rest of the videos in this series as well as the React Hooks series. I've been learning react for a while now but have never learned much of the theory behind why things work the way they do so i'm excited to learn more. I find your videos easy to follow and the animations are very helpful. Thank you so much for sharing your knowledge and all the effort you put into your videos, i really appreciate it!
I watched plenty of async and await tutorial videos, but no one tutorial video also I understood this much of in-depth concepts like event loop and all, I think even a kid can understand in this way of teaching, thank you for giving this tutorial
I don't know how to thank you for such a great piece of work. One of the best tutorial I have ever found on youtube. many many thanks. hope to see you someday.
That video was so soooo much Helpful. It cleared all my concept about sync and async javascript. Thank you so much for this. I didn't find such a detailed video on this topic.❤
@@tapasadhikary The quiz output is this: main f2 I am a Promise, right after f1 and f3! Really? I am a Promise after Promise! f3 f1 But why not this: main f2 I am a Promise, right after f1 and f3! Really? I am a Promise after Promise! f1 f3 Because task queue is a queue and f1 callback enters it first though there is a setTimeout duration lower for f3
@@madhusmita2207 Got it. It is because, for the WEB APIs like setTimeout, setInterval.. the callback will enter the queue wrt to the delayed time. The least delayed time callback will be getting in before the more delayed time ones.. hence they will go out early as well.. This catch you need to remember.. the case of setTimeout. I hope it is clear now.
I have watched many videos, more than 50-60 for the same topics, but no 1 has explained how you did, it is deep engraved in my brain, I can never forget this. Thank you ♥
Hey Taps, thanks for making this video. It was really helpful. There's one small thing, at 34:10, the executor function doesn't get placed inside the micro task queue. It's the callback function passed to the `.then` block which gets passed to the micro task queue.
I enjoyed the video! It's very simple to understand with cool examples and very nice animation displayed how event loop is working. Tapas, thank you so much! ❤Keep going! 👍
wow this was really good! At first I thought this video was too long and was impatient to watch the whole thing but having watched it all- I'm really happy I did and I'm glad you took the time to explain it in detail. It was very simple to understand, you used diagrams to help me conceptualise these very abstract entities like call stack, call back queue and job queue. And also you used examples and asked questions to quiz my understanding which I enjoyed doing with you. This helped me a lot in understanding how it works together. You're very good, please keep it up
Man I watched this today because I was curious what is asynchronous programming. I am into python & R. I don't even code in JS(did a small basics workshop back in 2021) & you know what this was so easier to understand that now I am thinking to get into JS again to expand my knowledge & open pathways as someone struggling to make a career transition to analytics. Thanks a bunch!! ❤
I have seen so many tutorials and no one showed it this way, actually how it works under the hood...I understand callbacks,I understand promises but why the hell async is called async that made me confuse. A simple misconception comes into my mind if async helps to run the code asynchronously then why there's an await which basically waits for the response inside of async, because if async helps to run the code inside that async function asynchronously then there should be no wait. This is where you came into place and solved the puzzle. That's what I loved about it, I just came up to your channel from your Freecodecamp article and I must it was just mind blowing. Thank you so much, and kindly make more detailed tutorials like this. How everything works behind the scene, I would love take a deeper dive. There are many courses(with millions of views) but I will bet there's not much with structured course, and not much with who shows the picture behind the scene and gives detailed information. Falling in love with this type of teaching.
thank you for your video! it really helped me to understand async and sync. i had a lot of problems with these before your video and now, i understood async and sync in JS! i hope more viewers and more subscribers for you. thank you again😄😄❤
After watching so many videos in youtube and asking many people to explain this concept , finally i came at right place.. This is the best explanation i have ever seen, You are the best teacher in this world, really that interactive diagram with your explanation skills is amazing,.. Thank you so much sir, U deserve a billion dollar subscribers.. Keep continue in this way sir.. Expecting more videos like this sir........Thank You So Much Sir
@@tapasadhikary Sir Can you please Make a this type of videos in topics like clousers, map method, filter method like this topics and also in the react js
I am an experienced developer . I wanted be an architect in mind , practically I was weak before watching your video . The video is simple and clear , I am like completely satisfied and confident of explaining promises in my life to anyone . God bless you
JUST WOW! @tapas... I now have a solid understanding of promises in just 40min vid because of you. I am excited to learn more.. The visualization is very very helpful.. I learned a lot everyday from you.. I wonder do you have a video regarding async and await?
Great explanation and thank you so much. Doing the exercises really helped too. So many js noobs like myself will benefit from this after pulling our hair out with trying to work out why global variables aren't getting picked up by certain code clusters.
These videos are pure GOLD, I was directed to mr Tapas video after praying to Allah, known as Almighty God In english, Elohom in Hebrew . Have 7 udemy javascript courses none of them were abe to explain this topic so easily understandable as mr Tapas, Truly a Grandmaster of Javasscript explanation to the layman
You are a blessing, I am currently working on my first task at my first internship at my first programming job! I am so stressed and nervous because I don't know everything that I need to know to be able to complete it but this video has helped me so much in getting closer! THANK YOU! Do you do any private lessons or tutoring?
I’m very glad it helped you. All the best with your ongoing internship and future career. I’m not doing private teaching yet. You can reach out to me on Twitter or LinkedIn if you have any specific doubts. I’ll try help based on my availability. Btw, don’t forget to SUBSCRIBE 😀
Hi im here with a stupid question... what if we add the promise inside an function and calls that function in same order as you did here 41:30 ( the output will be in same order as yours?) or if we use it as a callback in setTimeout Will the function (promise inside) is still in job que?
Hey, it's a great question. Let's run your situation with our formula. - Callbacks are always in the task q or callback q - Promises always in the Job Q - Regular Functions are always in the execution stack. - Event loop looks into the Qs when the stack emptys and bring things from Qs to the stack - Job Q gets higher precedence over the callback Q. Now, you try answering the situation. In case, promise inside a function, the function executed in the stack, the promise executor gets into the Job Q. Once nothing in the stack to execute, the promise executor function comes to stack, execute, story over! If the promise executor is in the callback of set timeout, the callback is placed in its Q; when nothing is in the stack, the callback gets to the stack, executed. But finds a promise in it now, put it in job q. Again, if nothing is in the stack, the promise executor comes into the stack and done. I hope, I was able to clarify. Try the quizzes I have kept in the repository mentioned in the description. Oh one more thing, today publishing a new video on callback. Please give it a look and let me know what you think of it 😀.
I have a doubt here. Suppose setTimeout(f1, 2000); setTimeout(f2, 1000); would f1,f2 be placed inside the Callback Queue immediately or after their timeout is over? If they are placed immediately, how would the event loop know that they have to be executed after a certain time and not right away(considering stack is empty at the moment)? And how would the order of execution be maintained? As f1 is before f2 in the code, f1 is placed before f2 in the CallBack Queue but f2 should be executed before f1 considering the timeout. On the other hand, if they are placed after their respective timeout is over, then where are the functions stored in the meantime?
It is a fantastic question and I'm glad you asked. The answer is, the associated callback of setTimeOut goes to CBQ only after the delay expires. It never gives to CBQ immediately. That is where the "Web APIs" box comes in the video. Now coming to your question of where the functions are stored in the meantime. I think the right way to think is, how are these callback functions are managed in the meantime? The callbacks are managed by the event loop in the meantime. The event loop's DSA makes sure to bring the qualified functions(the one delay expires) to the CBQ so that it can move to the next step(into call stack when it is free and there is nothing in JobQ as well).
@@tapasadhikary thank you for the reply. I appreciate the content of the video tutorials and also effort you take to reply to the comments. Correct me if I am wrong. Event loop takes care of moving the task to CBQ(when time expires) as well as moving the task from CBQ to stack(when stack is empty).
This is amazing and eye 👁️ opening video, learn a lot from this. I am super excited, my next every weekend will be productive, thank you so much sir. I never written new promise() from past one year, mostly using async and await. Never used this keyword, blindly going with arrow functions.(in reactJS) Sir can please explain why and when to use particular topic/concept...?
Hello Akhil, I am glad that you found it very helpful. Keep learning and keep experimenting. I would love to make more useful videos and thanks for the requests. If you get time, could you please create the requests here? github.com/atapas/youtube/issues/new/choose Just to make sure, I do not lose them :)
Your One of Indias best teacher, I never see some one explain this complicated topic in very simpler terms love you sir ❤️
Love you, Tushar. Thank you for your comment 💙
Great explanation and one of the best series available on the internet !!
Thanks a lot
I am a teacher and I know how hard it is to succinctly pass information across. If a teacher can effortlessly demystify a seemingly hard concept, s(he) is an excellent teacher. I confirm that you're an excellent teacher. Please, keep sharing your knowledge.
That means a lot to me. Thank you, a BIG ONE!
You're absolutely incredible! Before watching this video, I couldn't undestand the topics you discussed, but now I understand them perfectly. Thank you so much!
You are most welcome ❤️
I came to your channel to thank you about the detailed explanation because I read the article instead of watching the video and it was one of the best articles I read about an IT concept keep going Mr Tapas
Thank you very much 💛
I haven't come across anyone on the youtube explaining promises, synchronous and asynchronous stuff with this much detail
Thanks a lot, Nazrul 💙
I'm glad it was helpful 👍
Hey Tapas ! I saw ur video link from the blog at freecodeCamp as such that blog explains pretty much explains everything regarding nested functions being asynchronous while non-nested ones being synchronous , I just came here since i couldn't find a like button so here m linking ur video . Lots of support and convern to U ! Keep up the good work 😇
Thank you very much, Yogesh, for taking the time and encouraging my work. It means a lot to me. 🤩
Man, I don't know why your channel doesn't have more recognition. Thanks for this amazing explanation of event loops! I did more research about it because I didn't understand why the necessity of having 2 different queues, and why 'fetch' being a macrotask, ends up being resolved on the microtask queue (I hope I got it correct). Thanks for all
I also do not know! 😀
Nevertheless, I'm super glad it helped you and you liked it. Thanks!
I really don't know why Tapas is having less subscribers. Your teaching is phenomenal❤❤❤❤
Thank you❤️.
I also do not know, maybe people still do not know about it 🤔
I had a doubt regarding execution of Promises. Now its clear. Thanks Tapas Da
You are most welcome vai ☺️
Hi Tapas, Ive started watching this series after watching some of your videos about React Hooks. I enjoyed the video and the quiz afterwards and I'm looking forward to watching the rest of the videos in this series as well as the React Hooks series. I've been learning react for a while now but have never learned much of the theory behind why things work the way they do so i'm excited to learn more. I find your videos easy to follow and the animations are very helpful. Thank you so much for sharing your knowledge and all the effort you put into your videos, i really appreciate it!
Thanks a lot, Baden. It means a lot to me. 💙
I watched plenty of async and await tutorial videos, but no one tutorial video also I understood this much of in-depth concepts like event loop and all, I think even a kid can understand in this way of teaching, thank you for giving this tutorial
That's my source of inspiration. Thanks mate for the feedback 🙂
I don't know how to thank you for such a great piece of work. One of the best tutorial I have ever found on youtube. many many thanks. hope to see you someday.
I'm so glad that you found it helpful 💙. It's truly motivating. Keep learning. Yeah, sure, it will be fun meeting you in person 😊
That video was so soooo much Helpful. It cleared all my concept about sync and async javascript. Thank you so much for this. I didn't find such a detailed video on this topic.❤
Great to know, it helped. Thanks for letting me know.
one of the best explanations I've seen so far. Thank you
So glad 💙
One of the best video. Explained very well. Cleared all the doubts regarding async vs sync
Thanks a lot for the feedback 💙
undoubtedly the best one you should be proud of yourself sir!
🙏🙏🙏
Best video on this topic i was very confused about this topic now all things Cristal clear.
Thanks a lot 👍
Great video ✨ I liked the illustrations/GIFS
Thanks a lot
@@tapasadhikary sir I had a doubt in task queue so I asked it as a comment on your hashnode article on "task queue and job queue"
@@madhusmita2207 Hey I do not see any new comments in the name of Madhusmita on the article. Do you mind pointing me there or ask it here as well?
@@tapasadhikary
The quiz output is this:
main
f2
I am a Promise, right after f1 and f3! Really?
I am a Promise after Promise!
f3
f1
But why not this:
main
f2
I am a Promise, right after f1 and f3! Really?
I am a Promise after Promise!
f1
f3
Because task queue is a queue and f1 callback enters it first though there is a setTimeout duration lower for f3
@@madhusmita2207 Got it. It is because, for the WEB APIs like setTimeout, setInterval.. the callback will enter the queue wrt to the delayed time. The least delayed time callback will be getting in before the more delayed time ones.. hence they will go out early as well.. This catch you need to remember.. the case of setTimeout.
I hope it is clear now.
I have watched many videos, more than 50-60 for the same topics, but no 1 has explained how you did, it is deep engraved in my brain, I can never forget this. Thank you ♥
That makes my day, my friend… thanks ❤️
You just get a subscriber for these videos, thanks for explaining it so nicely
Thanks a lot 💙
Hey Taps, thanks for making this video. It was really helpful. There's one small thing, at 34:10, the executor function doesn't get placed inside the micro task queue. It's the callback function passed to the `.then` block which gets passed to the micro task queue.
Thanks Gaurav 💙
Yes, it's the callback function. You are right.
I just wanted to tell you that your video is really awesome! Very clear and easy to understand. Thank you!
Thanks Yuri, glad it was helpful to you 🙏
hi tapas nice explanation ,had so much confusion between promise ,callback but now I had good understanding, thankyou for the series
Thanks a lot Shubham 🙏
I enjoyed the video! It's very simple to understand with cool examples and very nice animation displayed how event loop is working. Tapas, thank you so much! ❤Keep going! 👍
Excellent 👌 thank you ☺️
Great tapash vai guize gulo sobi dhorte parsi. Thanks
wow this was really good! At first I thought this video was too long and was impatient to watch the whole thing but having watched it all- I'm really happy I did and I'm glad you took the time to explain it in detail. It was very simple to understand, you used diagrams to help me conceptualise these very abstract entities like call stack, call back queue and job queue. And also you used examples and asked questions to quiz my understanding which I enjoyed doing with you. This helped me a lot in understanding how it works together. You're very good, please keep it up
@@Astr0_AWBW great, thanks a lot ❤️❤️
Man I watched this today because I was curious what is asynchronous programming. I am into python & R.
I don't even code in JS(did a small basics workshop back in 2021) & you know what this was so easier to understand that now I am thinking to get into JS again to expand my knowledge & open pathways as someone struggling to make a career transition to analytics.
Thanks a bunch!! ❤
You are most welcome, Vivek 💛
I have seen so many tutorials and no one showed it this way, actually how it works under the hood...I understand callbacks,I understand promises but why the hell async is called async that made me confuse. A simple misconception comes into my mind if async helps to run the code asynchronously then why there's an await which basically waits for the response inside of async, because if async helps to run the code inside that async function asynchronously then there should be no wait. This is where you came into place and solved the puzzle. That's what I loved about it, I just came up to your channel from your Freecodecamp article and I must it was just mind blowing.
Thank you so much, and kindly make more detailed tutorials like this. How everything works behind the scene, I would love take a deeper dive. There are many courses(with millions of views) but I will bet there's not much with structured course, and not much with who shows the picture behind the scene and gives detailed information.
Falling in love with this type of teaching.
You made my day, Supratim ❤️. I'm overjoyed that the video series helped you understand the entire concept fundamentally 🙌
Simply amazing sir!
I really like the presentations!
You have explained this topic very easily!
Thanks a lot for making this amazing video!
Thanks Arindam! Glad you liked it. If you understand this concept, you can solve any promise questions in the future.
Explained confused topic crystal clear 👌
Thanks a lot, Ramesh ✌️
Thanks a lot Tapas , Even Im experienced, which gives me new way of learning and its perfect.
@@pushparagavansivaji3000 🙏🙏 great, I'm so glad.
Great video! Thank you for the visual explanation with the diagram
Thanks, Jeff. Glad, it was helpful.
@@tapasadhikary Definitely helpful. Would be cool to see a video on the JS Event Model (bubbling and capturing) :D
That was a brilliant explanation of sync vs async, and promises - thank you for making it easy to follow along and understand, Tapas!
Thanks a lot, Mike 💙
thank you for your video! it really helped me to understand async and sync. i had a lot of problems with these before your video and now, i understood async and sync in JS! i hope more viewers and more subscribers for you. thank you again😄😄❤
Thanks a lot, Saman 💛. Very glad it helped you. Thank you for the wishes.
well explained and straightforward, looking for Async/Await - Thank you so much
Thank you.. That's on the way 🧡
It was published last week. I hope you got a chance to view It. Thanks!
Thanks sir for providing this excellent content now I am understand very well sync/async code please providing content continuously
My pleasure 😇
Nicely explained JavaScript event loop which is very important. Enjoyed!
Thanks a lot. Glad you liked it.
Beautifully explained!! Thank you much!!! :)
You are welcome, Sneha
Best explanation of asynchronous js yet
That's very motivating 😀.
Amazing explanation, very detailed. Thank you !
Thank you!
Super simple to understand. Literally amazing
Thanks Amit 🙂
Waiting for full series, very well explained, lots of hard work has been put it. Thankyou sir
You are welcome, Harshit 🧡
sir you explained very clearly. Thaks you so much. Please continue to do like this quality content so far.
Thanks you! I’ve been doing that so. Don’t forget to check my react series 😀
After watching so many videos in youtube and asking many people to explain this concept , finally i came at right place..
This is the best explanation i have ever seen, You are the best teacher in this world, really that interactive diagram with your explanation skills is amazing,.. Thank you so much sir, U deserve a billion dollar subscribers.. Keep continue in this way sir..
Expecting more videos like this sir........Thank You So Much Sir
Thanks a lot for the feedback.
@@tapasadhikary Sir Can you please Make a this type of videos in topics like clousers, map method, filter method like this topics and also in the react js
Thanks for the requests. Could you please add them here when you can? github.com/atapas/youtube/issues/new/choose
Awesome adhikari ji
Thank you TyagiJi, Bohut bohut Shukriya 😃
Superb teaching style - there are so many resources out there on this topic but you truly made learning about this effortless!
Thanks a lot for such a feedback.
Super informative and great explanation as well , thank you Tapas :)
Thank you 💙
I am an experienced developer . I wanted be an architect in mind , practically I was weak before watching your video . The video is simple and clear , I am like completely satisfied and confident of explaining promises in my life to anyone . God bless you
Thanks for your kind feedback Navin. I am very happy to help with the knowledge.
Hello sir, You are god of me.. I never see some one explain this complicated topic in very simpler terms. thank you sir..
Thanks a lot, Chaitanya for your comment! It means a world to me, glad it helped.
Btw, I’m no God, just a teacher 😀
You are an amazingggggg Teacher. thank you for all the efforts. God Bless you
Thanks a lot 🙏
This is awesome. Kudos to you sir
Thank you
Thank you sir for the clear and detailed explanation. Wonderful video!
@@onlinecitizen8414 Thanks a lot ❤️
I wish I would find your videos many years ago. really great explanation !!!
Thanks a lot, now you found it 👍
Thanks for making this series it really helped me
Glad it helped 💙
JUST WOW! @tapas... I now have a solid understanding of promises in just 40min vid because of you. I am excited to learn more.. The visualization is very very helpful.. I learned a lot everyday from you.. I wonder do you have a video regarding async and await?
Thanks! Yes, async await video is available under the same playlist
This was good, well understood and appreciated!
Thanks a lot 👏
That was a great explanation. It helps a lot. Thank you for your efforts!!
You are mist welcome ❤️
That was a brilliant explanation of sync vs async , that show how you understand deeply. thanks from my heart ❤
Thanks a lot Awad. Means a lot to me.
Excellent video, was so easy to understand this core concept, many thanks!
You are most welcome 🙏
Thank you Sr!
Your explanation was very clear.
Great work, looking forward for the Promises video.
Keep it up!
Thank you! I just published the promise video yesterday 😀. An intro to promises.
তাপস ভাই,আপনার শিখানোর পদ্ধতি অসাধারণ..অনেক অনেক ধন্যবাদ আপনাকে🥰🥰🥰
Apnake one dhonyonad amake jananor jonyo… stahe thakun.
Phenomenal explanation 🙏
Most underrated tutor 🔥
U deserve more views and subscribers sir
U've really demystified Async part ❤️
Thanks a lot for the kind words. I much appreciate, and my hard work is paid off.
This video is amazing, I'm going to recommend it to everyone I know that is starting with js, thank you for your great job
Thanks a lot
best explanation and the exercises are really great.Thanks!
Great, thanks!
Great explanation and thank you so much. Doing the exercises really helped too. So many js noobs like myself will benefit from this after pulling our hair out with trying to work out why global variables aren't getting picked up by certain code clusters.
Thanks a lot.
You explained everything perfectly, thankyou sir and keep posting videos
Sure man. Thanks for encouraging.
Hello Tapas, I am new to Javascript. Some says JS is synchronous, some says asynchronous. But you explained it very well.
Thank you so much guruji 🙏
Thanks a lot 🚀 keep learning
Beautifully explained. Thank you so much.
You are welcome, Madhu. Glad it was helpful.
best in class tutorials sir
thank you so much
Thanks a lot, friend 🙏
Loved your video. Thank you for sharing.
Welcome 💙
Thank you very much for detailed explanation.
Welcome, Krutika 👍
really great slides and visuals help make the explanations super clear. thank you so much
You are welcome. Glad it was helpful.
Thank you so much for detailed information.
I’m glad you found it helpful 💙
These videos are pure GOLD, I was directed to mr Tapas video after praying to Allah, known as Almighty God In english, Elohom in Hebrew . Have 7 udemy javascript courses none of them were abe to explain this topic so easily understandable as mr Tapas, Truly a Grandmaster of Javasscript explanation to the layman
🙏🙏🙏 Thanks a lot.
great video, explained really well. the slides were really helpful
Thanks a lot, Alon
Very well and understandably explained. Thank you very much!
You are welcome. I'm glad it was helpful.
Beautifully explained
I want javascript full series where everything will be expalined very well
Thank you very much, Waseem.
this was great sir!
Thanks a lot, Amit
Actually worth every minute! Thank YOU and #freeCodeCamp for this
Glad, it was helpful and you liked it. 😀
superb explanation !!1
🙏🙏
You are a blessing, I am currently working on my first task at my first internship at my first programming job! I am so stressed and nervous because I don't know everything that I need to know to be able to complete it but this video has helped me so much in getting closer! THANK YOU! Do you do any private lessons or tutoring?
I’m very glad it helped you. All the best with your ongoing internship and future career.
I’m not doing private teaching yet. You can reach out to me on Twitter or LinkedIn if you have any specific doubts. I’ll try help based on my availability. Btw, don’t forget to SUBSCRIBE 😀
Hi im here with a stupid question... what if we add the promise inside an function and calls that function in same order as you did here 41:30 ( the output will be in same order as yours?) or if we use it as a callback in setTimeout Will the function (promise inside) is still in job que?
Hey, it's a great question. Let's run your situation with our formula.
- Callbacks are always in the task q or callback q
- Promises always in the Job Q
- Regular Functions are always in the execution stack.
- Event loop looks into the Qs when the stack emptys and bring things from Qs to the stack
- Job Q gets higher precedence over the callback Q.
Now, you try answering the situation. In case, promise inside a function, the function executed in the stack, the promise executor gets into the Job Q. Once nothing in the stack to execute, the promise executor function comes to stack, execute, story over!
If the promise executor is in the callback of set timeout, the callback is placed in its Q; when nothing is in the stack, the callback gets to the stack, executed. But finds a promise in it now, put it in job q. Again, if nothing is in the stack, the promise executor comes into the stack and done.
I hope, I was able to clarify. Try the quizzes I have kept in the repository mentioned in the description.
Oh one more thing, today publishing a new video on callback. Please give it a look and let me know what you think of it 😀.
🔥You are an amazing teacher Tapas, thank you for your efforts! 🔥
Thanks a lot ✨
Explained very well 👍
Thanks a lot, Fahd
Absolutely great.
🙏🙏🙏💙
Great Lectures...thank you sir
Welcome 💙
Very nice explanation.
Thank you
it's well & easily explained, waiting for the next video
Thanks a lot. The next video on the series will arrive in the coming weekend 🙂
I have a doubt here. Suppose
setTimeout(f1, 2000);
setTimeout(f2, 1000);
would f1,f2 be placed inside the Callback Queue immediately or after their timeout is over?
If they are placed immediately, how would the event loop know that they have to be executed after a certain time and not right away(considering stack is empty at the moment)? And how would the order of execution be maintained? As f1 is before f2 in the code, f1 is placed before f2 in the CallBack Queue but f2 should be executed before f1 considering the timeout.
On the other hand, if they are placed after their respective timeout is over, then where are the functions stored in the meantime?
It is a fantastic question and I'm glad you asked.
The answer is, the associated callback of setTimeOut goes to CBQ only after the delay expires. It never gives to CBQ immediately. That is where the "Web APIs" box comes in the video.
Now coming to your question of where the functions are stored in the meantime. I think the right way to think is, how are these callback functions are managed in the meantime?
The callbacks are managed by the event loop in the meantime. The event loop's DSA makes sure to bring the qualified functions(the one delay expires) to the CBQ so that it can move to the next step(into call stack when it is free and there is nothing in JobQ as well).
@@tapasadhikary thank you for the reply. I appreciate the content of the video tutorials and also effort you take to reply to the comments.
Correct me if I am wrong. Event loop takes care of moving the task to CBQ(when time expires) as well as moving the task from CBQ to stack(when stack is empty).
Spot on 🔥. That's correct.
Excellent content ❤❤❤
Thank you so much 😀
very good video....nice explanation
Thank you 💙
This was super easy to understand and this was a detailed guide
Thank you! :)
27:19 to 28:03 really nice explaination
Thank you!
really helpful, big thanks sir
Welcome 💙
Thank you So much ! well explained
Thanks a lot 💙
This is amazing and eye 👁️ opening video, learn a lot from this. I am super excited, my next every weekend will be productive, thank you so much sir.
I never written new promise() from past one year, mostly using async and await.
Never used this keyword, blindly going with arrow functions.(in reactJS)
Sir can please explain why and when to use particular topic/concept...?
Hello Akhil, I am glad that you found it very helpful. Keep learning and keep experimenting.
I would love to make more useful videos and thanks for the requests. If you get time, could you please create the requests here?
github.com/atapas/youtube/issues/new/choose
Just to make sure, I do not lose them :)
Just amazing❤️
Thanks a lot, brother ❤
really well explained. just had to speed up the video to 1.75x :P
Thanks a lot! One of my initial video... I guess I improved a lot since then 😉
Great video please make full javascript and dsa in JavaScript
Thanks, Suraj. After the Promise series, I shall start with a JavaScript objects, arrays, a few projects. DSA is on the card too. Please stay tuned.
@@tapasadhikary thanks your explanation is great... Love it..