🔥Dive deep into React JS with me, checkout `Namaste React` - namastedev.com/namaste-react Like this video and subscribe to the channel for more new video coming very soon. 🚀 Also comment down below what topics should I cover next.. ✌
@niteshrathore4341 Жыл бұрын
@akshaymarch7 can you explain the higher order component also
@PamelaSummers-n6n Жыл бұрын
Sir please launch a react js course with starting from javascript and also include backend part also
@ksubramanyeshwara Жыл бұрын
It would be nice if you make 3 to 5 projects in vanilla JS including all the basics to advanced concepts. Machine coding questions and System design as well. Also DSA in JavaScript would be awesome. 🙏🙏🙏
@twitterupdate8072 Жыл бұрын
Sir please cover AJAX,
@Vj_0_4 Жыл бұрын
Omg please do complete season 2 thats the least we could ask for please put a proper fullstop on this gem playlist❤😊
@GAURAVMOKASHI Жыл бұрын
Akshay Sir, Please clarify my doubt ! const p1 = new Promise( (resolve, reject) =>{ setTimeout(() =>{ resolve("Promise Resolved Value!!") }, 10000); }); const p2 = new Promise( (resolve, reject) =>{ setTimeout(() =>{ resolve("Promise Resolved Value!!") }, 5000); }); async function handlePromise(){ console.log("Hello World !!") const val = await p1; console.log("Namaste Javascript") console.log(val) const val2 = await p2; console.log("Namaste Javascript 2") console.log(val2) } handlePromise(); In the above condition, when p1 will resolve after 10 seconds, and p2 will resolve after 5 seconds then we see that after 10 seconds it will resolve both value. As p2's setTimeout value is lesser(5 Seconds) than p1.(10 Seconds) As you said when JavaScript fetch or reach the line of handlePromise function the following this will be happen. 1. In call stack first handlePromise is loaded and it console log the "Hello World !!" 2. Then it go to the next line, finds that there has been await p1. 3. When it saw await p1, handlePromise Function remove from call stack. 4. After the 10 seconds over, then Function go to call stack and start execution from where it is left. 5. Now the "Namaste Javascript" is print and also the val value i.e. "Promise Resolved Value!!" Now my query is How it will print/console.log the "Namaste Javascript 2" and also the val value i.e. "Promise Resolved Value!!" ? Because as I follow you in the Video, at that time it will not fetch the const val2 = await p2 Line. When it fetch "const val2 = await p2 ;" Logically It will then Remove the handlePromise Function remove from call stack Again. So before it go to "const val2 = await p2 ;" Line Interpreter do not know that there has another AWAIT Function there. (i.e. const val2 = await p2;) So how it prints "Namaste Javascript 2" and "Promise Resolved Value!!" for second time after 10 seconds? Please enlighten me for this condition. Thank you for Namste React also!
@GAURAVMOKASHI Жыл бұрын
Inshort Did p1 and p2 promises are resolved simultaneously during function execution? As p1 took 10 sec, does it mean in background ,p2 was also getting executed? I'm not getting it why Js engine didn't wait for p2 since after executing promise p1, it execute p2 and should wait for p2 to resolve because p1 and p2 are different promise and can have different operations.
@nikunj0706 Жыл бұрын
@@GAURAVMOKASHI The reason is, promises are not getting started executing when the function is called and it reaches to line 28 [At 43:21 ]Promises were added in the call stack a way before, before the function execution started. So, you are right, untill line 28 is getting executed, js will not move furhter, But P2 was already started running when jt encountered at line 18. Now simply understand this as, call the same function twice. Only first promise in the first function where function will get suspended and wait. For all other 3 promises there will be no wait and values will be printed no time
@nikunj0706 Жыл бұрын
The reason is, promises are not getting started executing when the function is called and it reaches to line 28 [At 43:21 ]Promises were added in the call stack a way before, before the function execution started. So, you are right, untill line 28 is getting executed, js will not move furhter, But P2 was already started running when jt encountered at line 18. Now simply understand this as, call the same function twice. Only first promise in the first function where function will get suspended and wait. For all other 3 promises there will be no wait and values will be printed no time
@vikaskumar-hc1cs Жыл бұрын
1. In call stack first handlePromise is loaded . and excution context is created for handlePromise. a) Their is two phase one is memory phase and second excution phase . when code goes from memory phase it see the promise and it will register a promise . b) when code goes in second phase ( excution phase) it will see that promise it resolve or not. ** every js program run in two phase sorry for bad english
@bm9code Жыл бұрын
@@vikaskumar-hc1cs no problem with your English; from where do you got this information, is there any resource
@omkarshidore4062 Жыл бұрын
Great energy, throughout the series, I've been working into backend, cloud & data-science for past 4 years, wanted to understand frontend for System design, Luckily I ran into your channel, spent the new years long weekend on both seasons of NamasteJS. Sending some love! Keep rolling out the content! 🍻
@trialaccount224410 ай бұрын
Ques). for those who thinks if code reaches await of p1 suspends function execution and after 5 sec it should go to await p2 the timer for p2 should start and should take 10 sec there so overall function execution should be 15sec? Ans). the timer ticking doesn't start at await, instead it started in the beginning of the code only where promise was declared. If the declaration would have been like inside async p1 declare then p1 await after that p2 declared follwed by p2 await then function would have taken 15 secs
@prachuryaray90348 ай бұрын
Exactly. The concept of hoisting comes into play.
@sourabhgarg28906 ай бұрын
thanks bro u cleared my doubt
@Daisy01-M5 ай бұрын
@@prachuryaray9034 did not get can you clarify it more ?
@amalenduguru24565 ай бұрын
this. You saved me
@PANKAJSHARMA-yu1ns4 ай бұрын
Please pin this comment, helps understand the execution of promises better
@shubhsharma1911 ай бұрын
Idk why this video has so less likes, this deserves so much appreciation!
@akshaymarch711 ай бұрын
Thank you, please share this on social media and to your friends and help us reach more people out there. Your support is much valuable to us. ♥️
@shubhsharma1911 ай бұрын
All my serious programmer friends watch your content already haha @@akshaymarch7
@AmarSingh-uw1db Жыл бұрын
Gratitude Sirji ❤❤. I request Sir to please make videos on 1) Design patterns 2) Solid Principles 3) File Upload(Single and Multiple) 4) Video Upload as Data stream 5) Forms with validation, error handling and warning messages 6) Ajax and xmlhttpRequest 7) Importing javascript and code Reusablility
@LokeshSharma-v2s11 ай бұрын
you and your skills its too AMAZING after the long practice with other KZbinrs today I have cleared my doubts so thanks for this but bhai aisa mat karna ki ye course bhi paid kar do tum😃😃😃
@mohammadaffan670210 ай бұрын
Promise: Think of a promise as a guarantee made by someone (like a function) to do something and provide you with the result later. It's like ordering food at a restaurant. You get a promise (receipt) saying your order will be ready soon. You can wait for it (.then()) or check on it later (.catch()). Async/Await: Async/await is like asking someone (a function) to do something for you, but instead of waiting for them to finish right there, you tell them you'll do something else while they work. It's like asking a friend to pick up your order from the restaurant. You can go do other things (like order a drink) while your friend (the async function) waits for the food (awaits the promise).
@Zeal-venkat17 күн бұрын
wow nice explanation bhai
@ganeshpavan7895 Жыл бұрын
This was very useful in diving deep to know how exactly things are running behind. Could you also please do a video on how exactly the callstack/fetch webapi/callback queue/micro task queue behaves when async function code reaches to await or using multiple awaits in a single async promise function.
@SAKSHIKATARIA5 ай бұрын
This will be helpful if we get this , Only this part is missing in this video. otherwise This is complete picture of async await :). and whole course is just wow. Thanks @akshay.
@premshahu9321 Жыл бұрын
4 page of notes , simplified and yet deep dive into the concepts why people don't understand and take an interest in learning anything of the teacher is this much enthusiastic and passionate about teaching code . Actually I find some of you tube channels that teach coding are just coders after a long I saw a proper coding teacher who can teach me and beleive I didn't get bored at all and by the time my intrest in knowing just keep increase. You are the teacher that not only teach but also develops the energy and enthusiasm and will to learn Thank you Akshay sir ❤
@komalpatil471110 ай бұрын
Must watch for All Front End Developers!!! Nothing can beat his way of explanation and his deep understanding.
@borntobefree8298 Жыл бұрын
Never seen a better explanation than this, How much you must be working to get all this knowledge and then putting out here for all of us with so much of effort and work. Thanks from all the developer community. You are a true teacher. Please keep teaching all of us .
@slayerxox21 күн бұрын
even after 100s of years when future generations have to learn the core of javascript, this is the place where they all will come for. this is beyond any any paid courses out there in market. the simplicity you explained such confusing concepts, i bet no one else could do it. we are lucky to learn js from you sir
@dheerajsharma-of8xs6 ай бұрын
• Async/await used for handling promises • Async always return a promise ° Await can only used inside an async function ° Can only write await keyword infront of a promise ° While awaiting JS Engine does not actually wait rather the function is suspended and call stack is free for other stuffs but it looks like program is waiting at that point ° Use try catch for Error handling and can also use . Catch() method
@nutankumari81848 ай бұрын
The best javascript and react teacher. You are the real gem. Thank you for sharing your knowledge with us. I have learned from many teachers on youtube but no one teaches like you.🙇♀🙇♀
@G_O_J_O_S_A_T_O_R_U Жыл бұрын
I wanted to take a moment to express my sincere appreciation for your course "Namaste Javascript". Your teaching style is clear and concise, and the way you explain complex concepts is truly impressive. I particularly enjoyed the practical examples you provided, which helped me to better understand the material. Thank you for sharing your knowledge and expertise with the world. I look forward to learning more from you in the future.
@67009 Жыл бұрын
Anyone purchase his namste react course? ...please let me knnow that all hooks are covered or not..? i am also planning to buy that's the reason i am asking...becoz in playlist its not mention about hooks ...i saw only useSate and memo hook...so please tell me if any one purchased..thankyou..
@G_O_J_O_S_A_T_O_R_U Жыл бұрын
@@67009 yes i have purchased it recently and let me tell you my friend this is the best react course i have found. I have currently completed 2 projects. Its very good not only for his teaching but the community support of namaste react is very good you will get to see lot of react devs. I entered this course with absolutely no knowledge on some of the topics like redux and testing and all . But now i feel very confident in it
@G_O_J_O_S_A_T_O_R_U Жыл бұрын
@@67009 about hooks akshay has covered many hooks while doing the project. In theory he did not go in deep about irrelevant hooks but while doing project he covered most of them including custom hooks also
@67009 Жыл бұрын
@@G_O_J_O_S_A_T_O_R_U thankyou buddy..
@mwesigyenicholas739411 күн бұрын
i have been right my backend using node.js and express.js with react.js at my frontend , its today that i have realized that i did not know what i was writing up to now. now everything is solid clear thanks sir for this series
@nk17nikky Жыл бұрын
I'm an QA engineer and wanted to learn JS concepts to prepare for my job interviews. And after watching all of your videos season 1 and 2, I'm feeling so confident that I can crack Developer JS interviews (after some practice obviously). Thank you so much for making the Namaste JavaScript series. 🙏Namaste 🙏
@karanahir9 Жыл бұрын
Amazing work Akshay!! I can say I Understand promises much better now after this video!
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel. This means a lot. ❤️
@rohinijadhav7224 Жыл бұрын
Thank you for sharing your knowledge😄Akshay. Please add following topics as well in namste JS season 2: 1. Browser - behind the scenes 2. DS in javascript 3. How to improve performance of application
@akshaychavan55116 ай бұрын
No one can match Akshay's energy while teaching. He's as curious as a small kid. Love it!!
@raghavbansal8068 Жыл бұрын
Thank you soo much for such a mindblowing explaination 🔥 I bet there couldn’t be a better explanation for covering such complex topic in such easy way.
@akshaymarch7 Жыл бұрын
Thanks for supporting my channel, means a lot to me!
@romaghosh86494 ай бұрын
my husband bought namaste React course for me and once I complete this whole season 2 videos , i will start with that course.
@garh.kumaon3 ай бұрын
Can you review the course? Namaste react
@rahulmaurya6451 Жыл бұрын
You made us Fall in love with JS ❤.. You are a true Gem . Please don't stop making videos , We can not get these premium content anywhere else,, we are totally rely on you,, It's pleasure to see you back again. Thankyou for making such amazing contents ❤
@Gourav-kl5jt Жыл бұрын
Akshay, You are a great teacher. I am really enjoying javascript now.
@abhijitpanchal704828 күн бұрын
I came here after completing the Namaste Javascript season 1. These playlists are the best resources to learn working of Javascript in detailed way. I have never understood these concepts so easily. Thanks a lot for the efforts, really appreciate it.
@juhibhardwaj6275 Жыл бұрын
One of the best teachers I have ever seen. I deeply appreciate the unwavering effort you put into your teaching. Thanks for the awesome content 🙂
@cantcode10014 ай бұрын
Hands down the BEST explanation of async/await I've ever seen. You sir, are a treasure, a scholar, and a gentleman. Thank you so much! You are a born teacher!
@kunalnailwal369 Жыл бұрын
Teacher like you can literally boost confidence in new coming developers like me. Please never stop teaching us🙏
@gautamnegi-wh9xi Жыл бұрын
Best Best Best that is what this video is, when you say nobody teaches this, that is literally true the way you explain the way you teach the way you deep dive that is simply amazing amaaaaaazingggg. I purchased your react course the way you taught the knowledge you shared in that course was next level the best thing was you actually knew where we the one watching the course will get stuck so you taught accordingly really appreciate it. You are Amazing a teacher.
@hardikjain_08 Жыл бұрын
I wish there were more amazing teachers like you can't thank you enough. I once hated web development now I love Js and react just because of the way you teach. Thank you Sir 🙏
@Sam-ps5xs10 ай бұрын
I am a developer with 2 yrs experience and for the first time I understood this topic completely. I have had read some articles previously but it didn’t gave me the complete understanding. Thank you for this. Never knew it was easier
@Vishnu-lc9gt Жыл бұрын
A movie can't hold my attention for an hour , but this glued me to my screen for the full episode. Great video as usual!🤩
@saisaranyan920811 ай бұрын
Akshay, I wish I had teachers like you during my college.. Thanks for making this course available for free in KZbin. I have enrolled for Namaste React few days back. Wish you all the success.
@Abi-rv3qk Жыл бұрын
I have completed Namaste JavaScript Seasons 1 and 2, and wow, what a course! . lots of in-depth knowledge about JavaScript, which I'm confident will stay with me for life. Anything bigger than this would only be in dreams. Now, I'm excited to start the React JS course. 😊 And you are the best teacher I've ever seen. Keep up the great work!"❤
@akshaymarch7 Жыл бұрын
Wish you the best, keep rising! 🚀
@lostgen36 Жыл бұрын
Amazing how all the concepts you taught in season 1 about task queue, microtask queue, call stack, event loop, execution context are in play here! There is nobody else who explains these topics in such deep level! But once you understand these in deep level and get your hands dirty in the chrome dev tools, it all just makes sense!
@lkshh48919 ай бұрын
43:02 so we can say that settimeout counter for both promises starts simultaneously but p2 resolves when p1 resolves which is after 10 s and for initial 5s setTimeout counter of p2 finishes but resolves when p1 resolves so it waits for another 5s for case where - p1 waits for 10s and p2 waits for 5s
@sanjusabu54889 ай бұрын
yes that because they are declared globally if they were declared inside a function and called separately, the timer would be started as they are called and not simultaneously. He missed this part.
@hersheynaik3029 Жыл бұрын
what a coincidence I just finished watching Namaste React and was sad it got over and I came to KZbin to check out your channel. BOOM new video🥳. OMG. After Namaste React I feel like I found the right path to learning new things in the right way. Thank you so much. I will give you a guru Dakshina when I get a job🤞
@sandeeproy6564 Жыл бұрын
Do you feel like you can create an application on your own, after you've finished Namaste React? Give us a review of your experience with the course please.
@aloktrivedi3285 Жыл бұрын
I also learned js from #akshaysaini, and currently I am learning react with nextjs (bcoz it becomes very easy to learn react with nextjs). What is your review of this course, is it worth paying 2000 for this course. Plzz tell
@hersheynaik3029 Жыл бұрын
@@aloktrivedi3285 100% worth it. He also goes in-depth and gives great insights about how everything actually works behind the scenes. After this course not only nextjs You can use or pair any library or framework with React with ease.
@hersheynaik3029 Жыл бұрын
@@sandeeproy6564 yess. Although I knew some basics of react, this course literally changed my perspective. I have confidence that I can build any web app now. The thing is after watching the lecture please put extra efforts of researching by yourself and code it. Try adding extra features etc. It'll be fun.
@bajishaik4802 Жыл бұрын
@@aloktrivedi3285 it is totally worth of paying 2000 or even more, because in this we actually build projects not just learning react and after this course you can have ability to build some other applications as well.
@archan_pandya10 ай бұрын
Your ability to explain everything is simply amazing! Thank you for your fantastic videos 🙏
@pavankulal9311 Жыл бұрын
I wish we would have teacher like you in college what an explanation 🙇. You make anything interesting. I have coding for 1 year I didn't knew how did it work behind the scenes . Thank you so much sir ❤️🙇
@akshaymarch7 Жыл бұрын
❤
@Codifywebee8 ай бұрын
You're just crazy. I have never seen anyone who teaches like you. I just loved it.
@the_corporate_wallah Жыл бұрын
Sir, It is because of you that I understood JavaScript. And today I am working as a javascript developer. Thank you so much Sir 😊❤
@akshaymarch7 Жыл бұрын
❤
@knowledgedose1956 Жыл бұрын
@@akshaymarch7I think at some point in video it starts repeating. Look at 7:45
@skzahirulislam2820 Жыл бұрын
@@knowledgedose1956repetition is good
@AdnanAli-cp9hk7 ай бұрын
Akshay Saini Sir, u should be the brand ambassador for JavaScript! Amazing Amazing explanation!. Thankyou so much.
@sushankznation Жыл бұрын
Thank you, Akshay, for such an amazing series. I'm eagerly waiting for #NamasteDSA now ;)
@prasannakr887 Жыл бұрын
Yes, We need #NamasteDSA
@ksubramanyeshwara Жыл бұрын
everyone waiting
@nezukochan905 ай бұрын
first time seen such a crystal clear explaination !!
@sumitkawale2549 Жыл бұрын
I was waiting so long for this series ❤❤❤. Glad that you come back
@KrishT0 Жыл бұрын
really its the only video in the youtube which cleared the async await concept at very deep level.
@AshwaniMaddheshiya-d2k Жыл бұрын
If this video had been made earlier, I would have done 2 more internships by now. But Thanks a lot❤. Didn't found a single video on KZbin who makes me understood it so well as you did.
@jaymaheshwari10759 ай бұрын
Bro didn't even hesitate to make this complex topic look so simple, kudos to you Sir.
@ksubramanyeshwara Жыл бұрын
Welcome back. Waiting for more topics to be covered. Also bring machine coding and system design and DSA in JavaScript please 🙏
@anupam60455 ай бұрын
Before watching this video i considered Async and Await as complicated part of javascript but now my every concept is crystal clear, and I loved how you broke down complex concepts into easy-to-understand steps. Thank you akshay bhaiya for putting your 100%+ effort .
@krishnamoorthysrinivasan1737 Жыл бұрын
at 45:16 in your example when you say 40 seconds for the second promise its actually 20 seconds after the first promise is executed but totally it takes 40 seconds from the beginning which says JS doesn't wait :)
@kartiklanjewar28926 ай бұрын
yes,correct
@kamalakantapanda4255 Жыл бұрын
Tiger is back
@swamipatil4566 Жыл бұрын
Loda tigers😂
@vamshikrishna6001 Жыл бұрын
Yes he resembles 🐅 😅. Orange & black 😂
@poojamishra13066 ай бұрын
Bhaiii, maan gayi bhaiii... the absolute clarity I am gaining... such an addiction watching u teach all of such topics so easily.. just blows my mind... , not commented so far.. but this explanation and trying to cover all cases so that we gain absolute clarity.. this is the type of teacher we wait for. Thank you so much! I am on the verge of completing this Javascript through you w feel so knowledge loaded.. even though I have not used javascript from a long time, I was able to understand all of it very easily and the foundations! Thank you!!
@SandeepSaini-tr9sv Жыл бұрын
i am skipping any movies or web shows just for this series ❤
@zameerkhan47804 ай бұрын
The energy that you put into teaching the concepts made me fall in love with java script.
@k.ashutoshbaitharu3964 Жыл бұрын
I watched the whole series and while waiting for this particular episode I landed a job, Thank you Akshay, the concepts learned from you in Namaste JS one way or another helped me secure the position.
@akshaymarch7 Жыл бұрын
Congratulations, wish you the best for your career ahead. 🚀
@ritikraj.186 ай бұрын
Thank you for such a detailed video akshay. Even after having worked on JavaScript for years now and writing async functions every other day, I was not aware of how things actually work behind the sence. I couldn't find anyone who takes a topic and grinds it this much. All I get to hear is "Asyc-Await is a wrapper over promises that makes the async code look like synchronous". All shallow stuff :). Request you to kindly continue bringing such rich content for us.
@rajchaurasiya12655 ай бұрын
Bhai yaar kasam se pdh ke mjaa he as gya itna excitement to movie me nhi aata😅😅 jo mind me question chal rha vhi next smjha rhe bhai and also explain edge cases🎉❤
@rajchaurasiya12655 ай бұрын
Itne subh subh aap comments pdhte hai bhaiya
@rajchaurasiya12655 ай бұрын
Aapke react ka course he pdh rha ho
@pujadey35510 ай бұрын
Omg, how can someone explain in such a simplified way? Thank you so much for this. U are a great teacher.
@aloktrivedi3285 Жыл бұрын
After so many days akshay bhaiyaa you are back😍😍😍😍. I am planning to purchase your namaste react course. I started learning js from your namaste js series, and now it's been 6 months 🥰🥰🙏🙏🙏🙏
@vinayakag900 Жыл бұрын
On which platform Namaste react course is available
@aloktrivedi3285 Жыл бұрын
@@vinayakag900 on his own website namastedev
@ishantkushwaha534 Жыл бұрын
@vinayakag900 Namaste Dev website.
@parveshqaiser984022 күн бұрын
Very Good Lecture. All these i have been keeping this doubt of how it works. Now, after watching this lecture, its clear.
@DurgeshYadav-hp8my Жыл бұрын
Waiting for this series😅
@harshikasani6436 Жыл бұрын
Time, Tide & JS awaits for none!!! A like for the dedication towards java script.
@faizanmuhammad8029 ай бұрын
Great Tutorial, I've a question which is still confusing me how both p1, p2 will start their background work simultaenously? what if p2 is a fetch function which is taking a paramter returned by p1, in this case how p1, p2 can be trigger simultaneously? As we were seeing in video, it seems like p1, p2 were triggering simultaneously
@tusharikas54472 ай бұрын
When you create a new Promise, the executor function (the function passed to the Promise constructor) runs immediately. This means that any code within it, including timers like setTimeout, begins executing right away. Timers start immediately: When you create promises, their timers are set to run right away, regardless of when you start waiting on them with await.
@tusharbharane14847 ай бұрын
But what is happening when the function is suspended? And how it is coming back to call stack and how it is again start its execution from where it left?
@shaleenchowdhary6 ай бұрын
When the function is suspended, it goes to the microtask queue for promise settlement, when it's done, it gets back to the main thread and all this movements of that async function is done by the event loop.
@avigupta36916 ай бұрын
@@shaleenchowdhary hey I wanted to know that, if the function is grtting suspended on interacting with the 1st await promise, and the further code has stopped working there, how the 2nd promise also running parallel to the 1st one, when and how we started the time ofo the 2nd promise
@AlekhyaMedarametla6 ай бұрын
Function is not suspended it is paused the function is indeed stored and managed within the microtask queue.
@tm2k235 ай бұрын
@@avigupta3691even I am wondering the same 🥲
@Rajkumar-20023 ай бұрын
@@avigupta3691 No brother, All the promises are created and timer are started executing when you click the run, no matter if you are giving await or not, it will resolve after the particular time. to understand this give the whole async function in a settimeout for 15 sec, after 15 sec it will print all the promise immediately without taking any time. because when you started the program the promises are executed.
@skreddysasi3404 Жыл бұрын
Thank you Soo much Akshay Bhai 🥰
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel. This means a lot. ❤️
@skreddysasi3404 Жыл бұрын
💖😍
@aniketroy03 Жыл бұрын
Hello Sir, there is one manjor concern many students facing and have mentioned in the comments. Q: How p2 which takes 10 sec, getting resolved just after 5 sec once p1 gets resolved which itself took 5 sec. Because of await behaviour it should have been (10 + 5 = 15 sec) instead of (10 + 0 = 10 sec)? A: Basically, p1 and p2 are getting directly initialised with the promise constructor which takes the callback and immediately executes it so the setTimeouts are already registered even before the handlePromise() invocation. In the video, it appears that the setTimeouts are getting registered after the handlePromise() invocation. But, even before the handlePromise() gets executed the setTimeouts from the promise constructors of both p1 and p2 are working asynchronously and the promises are waiting for their resolution. So the registering of setTimeout has nothing to do with the await inside the handlePromise() function. To properly see the magic of await, wrap the promises p1 and p2 into a function and return them respectively. And with await, call those function like: await p1(); await p2();
@ashutoshgupta45011 ай бұрын
Thanks for this clarification, have the same doubt why its not taking additional 5 sec for p2
@ADLTechCode4 ай бұрын
I'm happy to see you. You enjoy your teaching and always smile. Keep teaching with a smile; you're amazing.
@vishaltanna819811 ай бұрын
One of the best teachers for FE. I particularly enjoyed the practical examples you provided, which helped me to better understand the material.
@vortexdeo45458 ай бұрын
Since Both promise function are declared at top itself of JS execution Promise creation triggers both setTimeouts at that point only So it doesn't wait for each one after the other Even declaring simultaneously at top of inside handlePromise()- wouldn't change anything - because still same thing will happen. Both Promise creation will again trigger setTimeout If p2 is created after we await p1 - then its setTimeout will start afterwards and JS will wait for it separately
@mohdmaaz66517 ай бұрын
Thanks for clearing my doubt
@adityamishra4659 ай бұрын
One of the best JS course i have seen till Love you bhaiya
@subhransuporel44854 ай бұрын
I have never seen a better video on async/ await concepts in JavaScript.. Thank you Akshay for spreading awareness about such beautiful concepts in JavaScript.. Thanks for your effort and time.. Mr. JavaScript ☺
@DevalChawda-iy9ki Жыл бұрын
You don't have to beg for likes and comments my friend, your content is too awesome that not one can forget to drop heart here ❤
@zubiaaminkayani28953 ай бұрын
After watching this video i am in love with javaScript . We need teacher like Akshay
@PadminiRao-h4vАй бұрын
You are such a great teacher.. explaining all tiny details to us. your videos are very helpful. Thanks alot :)
@Jonathan.10610 ай бұрын
Your way of teaching and Depth Explanation of JavaScript is amazing I always come back to learn and revise from your content. Hats off for your wonderful content sir Thank you.
@creativeshorts6448 Жыл бұрын
Before this video, I was very confused about async and await after this I am becoming a pro in async and await. Thank you very much for this video
@kumarhimanshu232610 ай бұрын
This content is pure GOLD and Akshay Bhaiya is GoldSmith
@MakrandGuravM8 ай бұрын
I was shocked to see some new concepts despite "thinking" that i knew Async-await and I wanted to thank you for teaching us so fondly and deeply. Cheers and best wishes, Akshay
@amansahu92007 күн бұрын
no other video can teach you and explain you the execution of async await and how they are different from .then() extremely grateful for this video 🙏🙏
@SaranKarthik25106 ай бұрын
This is the best place where I have learnt async await in a best manner. Thanks
@VinaykumarGupta-g7n Жыл бұрын
Because of this series I'm way better JS developer than before. Thank you Akshay Saini.
@sadeemdzakaria30052 ай бұрын
This playlist is a goldmine for JS learners
@Daisy01-M5 ай бұрын
Akshay Really you are a great teacher! and Your knowledge is also eternal just like your name.
@harshlodhi8678 Жыл бұрын
Literally best concept series "Namaste Bhaiya "🔥🔥
@pearlsharma81448 ай бұрын
you are a great teacher, your passion for sharing the knowledge is highly appreciable. Gratitude
@naymurrahman9146 Жыл бұрын
This is one of the best tutorials about async await ❤
@adnanibrahim953311 ай бұрын
Koi itna aachy say kaisay pada skta hai ! You're a gem bro ! Love you ❤❤
@godofwar82623 ай бұрын
Like a year back i watched your video after seeing appreciation on linkedin but i mind i thought your a Indian dev like those didi and bhaiya who want to sell thier course Frist time I watched it i don't get it but after year I watched your whole series one by one and i love js now it help me to learn things in depth after that i will watch your react js than node js please create video on typescript
@oqant04248 ай бұрын
A heartfelt thank u from the bottom of my heart to u sir. No one can deep dive the way u did You re the GOAT ..........literally. Thanks :) May God bless u with every happiness of this Universe.
@akshaymarch77 ай бұрын
Thank you for your blessings! ❤️
@mjftw9473 Жыл бұрын
After a long gap you came back with a banger ❤❤❤
@smyasir050 Жыл бұрын
Your are the new star for js coding can't able explain you doing life so eazy
@jayantyadav92656 ай бұрын
sir mene coding sikhna start ki tho to mujhe lgta syd merese nhi hoga hmesha doubt rehta but sir you are great kya padaya he meri coding or concept clear hone ki vajah sirf aap ho
@achiranjeevi440816 күн бұрын
Deep understanding of async and await combo for handling promises What happens behind the scenes when we handle multiple promises inside async function, little about fetch api, error handling etc, thank you Akshay for teaching javascript for free
@ShivendraTripathi-in8ov8 ай бұрын
Amazing content Akshay. You are really the best teacher of Javascript around.
@sanjeevpandey87763 ай бұрын
you killed it bhaiya!! tried to learn this from many other channels but got to know deep about this only here and now i am totally clear thank you soo much!!
@abhijitranjan19463 ай бұрын
Really awsome to understand promises , Async/await and how the process is going on behind the scene. Thanks
@maulithaker59845 ай бұрын
Akshay, this is the best video regarding the all promises concepts… 🎉 You are working really great for making these videos…
@亗Pawar8 ай бұрын
/* The Fetch API provides an interface for fetching (sending/receiving) resources. It uses Request and Reponse objects. The fetch() method is used to fetch a resource(data). let promise = fetch(url,[options]) own words (for json()method): API ko call krne ka process -> 1) we first send request to the API we get some response (in the format of JSON) 2) we need to convert JSON into JS object and we can achieve this by using .json() method; */
@skrafikulislam326610 ай бұрын
This is the best video I've ever seen on this topic, not only my concepts are clear but also I feel so much confident