Creating a Promise, Chaining & Error Handling | Ep 03 Season 02 Namaste JavaScript

  Рет қаралды 230,100

Akshay Saini

Akshay Saini

Күн бұрын

Promise Constructor is used with the new keyword to create a new Promise. In this video, we dive deeper into creating Promises and cover everything about Promise Chaining and Error Handling.
00:00 - Introduction
01:05 - Consuming Promises
02:56 - Creating a Promise
15:23 - Promise Rejection
16:21 - Error Handling
18:17 - Promise Chaining
22:33 - Advanced Promise Chaining
26:28 - Advanced Error Handling
32:24 - Recap of the video
35:35 - Teaser of the Next Video
36:10 - Homework for this episode
38:25 - Thank you for watching Namaste JavaScript 🙏
If you find this video helpful,
Please support me by giving a Super Thanks contribution to the video ♥️
If not by money,
you can also support this video series, by sharing it with your friends on Social Media. 🙏
I'll give my best to come up with great content and everything absolutely for free on KZbin. 😊
Also, give it a thumbs up and subscribe to my channel for more such videos. 🔔
Link to Subscribe: kzbin.info...
Cheers,
Akshay Saini
akshaysaini.in
Stay Connected:
LinkedIn - / akshaymarch7
Facebook - / akshaymarch7
Instagram - / akshaymarch7
Twitter - / akshaymarch7
#NamasteJavaScript #AkshaySaini

Пікірлер: 895
@sujit510
@sujit510 Жыл бұрын
Excellent stuff, Thanks Akshay!
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Sujit. This means a lot. ❤️
@sujit510
@sujit510 Жыл бұрын
@@akshaymarch7 No problem, you truly deserve all the support and encouragement to keep creating such videos for sharing knowledge in such simplest way. And it's not only useful for newcomers, but also for many experienced people like me to strengthen their basics about Javascript. I truly admire your dedication and desperation to make people understand the concept thoroughly. Just keep it up!!
@asishankam6552
@asishankam6552 Жыл бұрын
I like to pay but I don't have any money Sorry for taking stuff free
@ayushi8412
@ayushi8412 Жыл бұрын
currently I am pursuing mca from ignou (open) and before that I have done bsc mathematics .I am fresher .I wants to work at top companies.many of friends are telling with these degrees I cant join top mnc as they dont give preference to open degree .I am very much frustrated .is it TRUE?
@ayushi8412
@ayushi8412 Жыл бұрын
@akshaymarch7 currently I am pursuing mca from ignou (open) and before that I have done bsc mathematics .I am fresher .I wants to work at top companies.many of friends are telling with these degrees I cant join top mnc as they dont give preference to open degree .I am very much frustrated .is it TRUE?
@akshaymarch7
@akshaymarch7 Жыл бұрын
This Episode is a little long, but trust me everything taught is super important. Watch this video with full attention and also finish the homework given at the end of this video. All the Best. Keep Rising! 🚀
@EngineBoy
@EngineBoy Жыл бұрын
always
@mayukhdevansahu5707
@mayukhdevansahu5707 Жыл бұрын
I'm watching this video over and over again... It's so addictive.
@dakshlakhotiya4275
@dakshlakhotiya4275 Жыл бұрын
Akshay sir, Please make a vedio on polyfill concepts...🙏🙏
@yogeshkataria9741
@yogeshkataria9741 Жыл бұрын
akshay sir, you didn't upload any more videos ? everything is good ?
@AbhishekPal-99
@AbhishekPal-99 Жыл бұрын
Hi Akshay, when can we expect video on Async await and how it is better than promise chaining.. ?
@abhishekkadavergu691
@abhishekkadavergu691 Жыл бұрын
If you are really interested to learn or know something really important, then you won't bother about the length of the video. No trash, No Bakwaas, just pure concepts and real-time things. I loved it. Big hug Akshay 🤗.
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Abhishek. This means a lot. ❤️
@ALL_R0UNDER
@ALL_R0UNDER 2 ай бұрын
Bhai...! Kya hi bolu main aapko! Just take my 🙏Namaskar🙏 You don't know how many problems of developers you've solved just by this video.
@spillthebuzz
@spillthebuzz Жыл бұрын
when can we expect EP-04 ??? you made me fall in love with JavaScript, Amazing content
@parthgoswami3221
@parthgoswami3221 10 ай бұрын
fr it made me fall in love too
@rjsk464
@rjsk464 Жыл бұрын
Big Thanks to Akshay sir Pls bring the EP04, waiting for it.
@gaganbaghel8051
@gaganbaghel8051 Жыл бұрын
Ha Bhai daalo age k videos yaar jaldi jaldi
@akshaymarch7
@akshaymarch7 7 ай бұрын
Thank you so much for supporting my channel. This means a lot. ❤️
@DebojyotiMandal
@DebojyotiMandal Жыл бұрын
Most beautiful playlists on JavaScript. Binge watched the 23+4=27 videos in 3 days. *Please continue this series.*
@sanaumar3579
@sanaumar3579 Жыл бұрын
Akshay you are great...you made me fall in love with JavaScript 😂... keep teaching us...lots of respect for you
@nixacademy3395
@nixacademy3395 Жыл бұрын
What a gem of a person you are. The amount of clarity you have is phenomenal
@ganeshkhirwadkar4127
@ganeshkhirwadkar4127 Жыл бұрын
Thanks a lot for all your awesome videos. I know and respect each and every efforts behind each video !
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Ganesh. This means a lot. ❤️
@ranjanbhat5607
@ranjanbhat5607 Жыл бұрын
Hi Ganesh. Y are u paying money to Akshay?
@ganeshkhirwadkar4127
@ganeshkhirwadkar4127 Жыл бұрын
@Ranjan - Why did you pay for the school where you studied ! It is available free does not mean there are no efforts given. It might be his kindness that he gave it for free. But at the same I felt that he might need to setup and what not other expenses for all these sessions. Hence I paid and believe me the money I paid is just a way of thanking him and his efforts ! Not a necessity. I hope i was able to answer your doubt !
@ranjanbhat5607
@ranjanbhat5607 Жыл бұрын
@@ganeshkhirwadkar4127 that's great initiative from your side. I will also pay. Thanks for your ans👍☺️
@divyendumaurya9651
@divyendumaurya9651 3 ай бұрын
well answered@@ganeshkhirwadkar4127
@nour.m8205
@nour.m8205 11 ай бұрын
Excellent videos! Thank you. Please produce more like these, I love how you simplify things and make everything make sense and don't worry about the length! Serious learners will sit through hours of video if the content is high quality like this!
@mithleshfantezie
@mithleshfantezie Жыл бұрын
I though functions were only beautiful. However, after going through promise episodes I realise promises are also beautiful. Thank you so much for making us fall in love with Javascript 🙏
@nishankarora3809
@nishankarora3809 Жыл бұрын
Akshay just want to say a big thank you. i have been working for over 10 years in IT industry but the clarity of javascript given by you for core concepts is invaluable. Not only it helped me in interviews but also helped to be a better developer. Amazing work!!! I hope you'll amaze us every time and keep the good content coming :)
@manoharsingh1920
@manoharsingh1920 Жыл бұрын
Thanks Akshay for distilling JavaScript into your super easy videos. I just loved it. You're giving your precious time to teach all of us here, Kudos to you. Looking forward to your next awesome video.
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Manohar. This means a lot. ❤️
@yerramsettyram3354
@yerramsettyram3354 Жыл бұрын
@@akshaymarch7 bro when can we expect the next video
@omprakashmaurya4567
@omprakashmaurya4567 Жыл бұрын
Akshay big thanks to you for make such kind of videos. I really appreciate your teaching technique for deep concepts. const cart = [ { itemName : 'Shoes', itemPrice : 2000 }, { itemName : 'Paint', itemPrice : 2500 }, { itemName : 'Kurta', itemPrice : 1500 } ]; let walletBalance = 10000; createOrder(cart) .then(function(orderId){ return orderId; }) .then(function(orderId){ return proceedToPayment(orderId); }) .then(function(orderStatus){ return showOrderSummery(orderStatus); }) .then(function(orderHistory){ return updateWallet(orderHistory); }) .then(function(res){ console.log(res); }) .catch((err)=>{ console.log(err.message) }) function createOrder(cart){ return new Promise(function(resolve,reject){ if(!validateCart(cart)){ reject(new Error("Cart is not valid")); } let orderId=10 if(orderId){ resolve(orderId); } }) } function proceedToPayment(orderId){ return new Promise(function(resolve,reject){ if(orderId){ resolve({paymentStatus : 1, message : "Payment successfully completed"}); }else{ reject(new Error("Payment Failed")); } }) } function showOrderSummery(orderStatus){ return new Promise(function(resolve,reject){ if(orderStatus.paymentStatus === 1){ resolve({status:'success', orders : cart}); }else{ reject(new Error("Something went wrong")); } }) } function updateWallet(orderHistory){ return new Promise(function(resolve,reject){ if(orderHistory.status === 'success'){ let orderAmount = 6000; walletBalance = walletBalance - orderAmount; resolve({balance : walletBalance, 'message':'Wallet updated'}); }else{ reject(new Error("Wallet balance not updated")); } }) } function validateCart(cart){ return true; } If any kind of suggestion for my code please tell me.✍
@senthamarai_kannan.
@senthamarai_kannan. Жыл бұрын
createOrder(cart) .then(orderId => orderId) .then(orderId => proceedToPayment(orderId)) .then(orderStatus => showOrderSummery(orderStatus)) .then(orderHistory => updateWallet(orderHistory)) .then(res => console.log(res)) .catch(err => console.log(err.message))
@rhimanshu6288
@rhimanshu6288 Жыл бұрын
Nicely written bro
@mdsharique9685
@mdsharique9685 Жыл бұрын
Awesome bro @omprakashmaurya
@mdsharique9685
@mdsharique9685 Жыл бұрын
Same solution with async/await async function getOrderDetails() { const orderId = await createOrder(cart) console.log(orderId) const orderStatus = await proceedToPayment(orderId) const orderHistory = await showOrderSummary(orderStatus) const response = await updateWallet(orderHistory) const finalResult = await (function(){ return response }(response)) console.log(finalResult) } getOrderDetails()
@mrvarma599
@mrvarma599 Жыл бұрын
@@senthamarai_kannan. You should return the parameters like order Id and proceedToPayment and all
@eshaanbagga5159
@eshaanbagga5159 Жыл бұрын
Lengthy videos are never an issue Akshay sir, getting the knowledge about each n everything in depth is what matters!
@jagrutsharma9150
@jagrutsharma9150 Жыл бұрын
1. Promise can be created using a new Promise() constructor function. 2. This constructor function takes a callback function as argument. 3. The callback function has 2 arguments named 'resolve' and 'reject'. Resolve and reject are the keywords provided by JS. 4. We can only resolve or reject a promise. Nothing else can be done. 5. An error can also be created using new Error('error message'). 6. There is also .catch() which is used to attach a failure callback function that handles any error that pops up during the execution of promise chain. 7. .catch only handles error of .then() that are present above it. If there is any .then() below it, catch will not handle any error for that, also that ,then will get executed no matter what. 8. It can be useful in a way if we want to catch error for a particular portion of a chain. 9. We can have multiple catch based on requirement and then a general catch at the end. 10. Always remember to return a value in the promise chain for the next .then to use . 11. If it returns a value => It will be used as an argument in next function. If it is a promise then the next .then in the promise chain is attached to the promise returned by the current callback function. Homework: const cart = ['shoes', 'pants', 'kurta']; createOrder(cart) .then(function(orderId) { console.log(orderId); return orderId; }) .then(function(orderID) { return proceedToPayment(orderID) }) .then(function({ message, amt }) { console.log(message, 'of amount:', amt); return showOrderSummary(message, amt); }) .then(function({ message, amt }) { console.log('Your wallet has beed debited by:', amt); }) .catch(function(err) { console.log(err.message); }) .then(function() { console.log('No matter what happens, I will get executed'); }); function createOrder(cart) { const pr = new Promise(function(resolve, reject) { // create order // Validate Cart // orderId if (!validateCart(cart)) { const err = new Error('Cart is not valid!'); reject(err); } // logic for createOrder const orderId = '12345'; if (orderId) { setTimeout(function() { resolve(orderId); }, 5000) } }); return pr; } function proceedToPayment(orderID) { // Logic for handling payment. // This function returns a promise return new Promise(function(resolve, reject) { // logic resolve({ message: `Payment Successful for order id: ${orderID}`, amt: 2500 }); }) } function showOrderSummary(paymentInfo, amt) { return new Promise(function(resolve, reject) { // console.log(amt); if (amt >= 2000) { resolve({ message: 'You have ordered items that cost ${amt} RS', amt }); } else { reject(new Error('Please buy more for discount')); } }) } function validateCart(cart) { // code to validate cart. return true; // return false; }
@abhishekshimpi214
@abhishekshimpi214 Жыл бұрын
Thanks brother 🙏
@python-gamer9711
@python-gamer9711 11 ай бұрын
Bhai mai namaste javascript wali hrr ek video k comment section m tumko dhoondhta hu, video khatam hona k baad
@AYUSHKUMAR-ns3lt
@AYUSHKUMAR-ns3lt 11 ай бұрын
@@python-gamer9711 His name is reflect is work... isin' tit. 😊
@harshmohite6297
@harshmohite6297 11 ай бұрын
Bhai aapka knowledge toh kamaal ka hai bhai.
@vivekbhatt3932
@vivekbhatt3932 10 ай бұрын
@@harshmohite6297 sahi baat hai
@shanmukhbharadwaj1520
@shanmukhbharadwaj1520 11 ай бұрын
This is the bestesttt JS course I have found on internet. Please just do not stop this course. That's all we wish for 🙏.
@keshavsharma4721
@keshavsharma4721 Жыл бұрын
I had an interview a couple of days back. The interviewer asked me how we can continue executing few "then" blocks even if we have an error from one of them. To be honest, I didn't understand his question then. Now I know what he meant and have the answer after watching this video. Thanks so much Akshay !
@dieshimitigert6758
@dieshimitigert6758 Жыл бұрын
It's really great to have a youtube video that explaines all these important concept in such depth. It's really like going to a lecture at university. Such a great content!
@abhishek_osu
@abhishek_osu 9 ай бұрын
Hi Akshay, people like me are really loving these content of javascript and the way you are teaching has made all of us love Javascript. Please please please release the next episodes ...We all love your content, your efforts, your teaching style.
@subhashinisahu3398
@subhashinisahu3398 8 ай бұрын
Best Video explaining Promise on the entire internet. Please keep making such in depth videos no matter how long they are. Love the way you explain things from ground level and build on top of that. Thank you so much Sir.
@sdsgfhgthjj
@sdsgfhgthjj Жыл бұрын
I binge-watched your JS series; Thank you for all the "Aha!" Moments. You are Pushpa and JS is Red-sanders; Thagede Le!
@dushyanthchowdary1388
@dushyanthchowdary1388 Жыл бұрын
My solution to the problem: const cart = ["Bitcoin", "Glasses", "Kurta", "Jacob & Co", "Xbox"] let order createOrder(cart) .then(function (orderId) { order = orderId return proccedToPayment(orderId) }) .then(function (pin) { return showOrderSummary(pin) }) .then(function (msg) { updateWallet(order, msg) }) .catch((err) => { console.log(err) }) function createOrder(items) { return new Promise((reslove, reject) => { if (items.length >= 5) { console.log("Order: 49591214") reslove(49591214) } else { const err = new Error("Add more Items. Items must be >=5") reject(err) } }) } function proccedToPayment(orderId) { return new Promise((reslove, reject) => { setTimeout(() => { if (orderId === 49591214) { console.log("OrderID: 49591214 Enter your UPI Pin") const pin = 13579 reslove(pin) } else { const err = new Error("Payment not succesful") reject(err) } }, 5000) }) } function showOrderSummary(pin) { return new Promise((resolve, reject) => { setTimeout(() => { if (pin === 135790) { resolve("Payment Succesful! Order Created: ") } else { const err = new Error("WRONG PIN!") reject(err) } }, 4000) }) } function updateWallet(order, msg) { console.log(msg + order) }
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel. This means a lot. ❤️
@SabariKrishnan-lm2ew
@SabariKrishnan-lm2ew Жыл бұрын
Your videos helped me in cracking an interview
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel. This means a lot. ❤️
@pmrrougeole3916
@pmrrougeole3916 Жыл бұрын
I love the way you explain things. Thank you making javascript a piece of cake. May God bless you.
@deadlock_33
@deadlock_33 Жыл бұрын
Nowadays everyone is creating for beginners or a so called crash course but.... As developer I want to see such kind of videos where you will see deep scenario and realtime code debugging we like this length of videos Kudos to you Akshay bhaiya❤️
@himanshuarora1910
@himanshuarora1910 Жыл бұрын
bhai tu developer bna kaise fir
@harshbhardwaj6060
@harshbhardwaj6060 Жыл бұрын
really a great video, I had already studied this concept multiple times from multiple places, but none of them made this topic as crystal clear as you did. I think the length does not matter if content quality is good. Example chosen was dope. much respect to you ❤
@isaackimura1636
@isaackimura1636 Жыл бұрын
Akshay, thank you so much bro for your amazing content, I have been coding in JS for a while but the clarity I get from your work about very important core concepts in Javascript is on another level!! Keep up the good work Bro👏!
@rishabh_shukla20
@rishabh_shukla20 10 ай бұрын
You're a great Teacher Akshay. Nowadays whenever I watch a new video of yours I assume I will be surprised, and I am not even disappointed once. Frankly speaking I would have slept if someone else would have made video this long. But I can watch all your episodes in one go, due to the unique content and your unique way of Teaching. Thankyou for all your efforts and hoping to see the new video soon :)
@vickykumargupta605
@vickykumargupta605 Жыл бұрын
Akshay, I am astounded by the quality of your content! I will be eternally grateful for your content.
@imkrrishnayak
@imkrrishnayak Жыл бұрын
beyond words!! this is the best promise chaining video on internet!!! thanks buddy!
@Anand4213
@Anand4213 Жыл бұрын
It's here😍. For the first time in my life, I'm excited that a video is long, because I know I'll definitely get more quality content.
@divyanshsinghbhati6026
@divyanshsinghbhati6026 Жыл бұрын
Your Teaching very well !!! as student with curiosity i want to know every thing , why things happing , what going in the bg when i ran my code , u explain each and every thing along with industries problem that we have to face in the future , you are the best coding teacher i ever found on internet .
@yashsuthar3172
@yashsuthar3172 Жыл бұрын
you are very good teacher so far on youtube. I've watched all season 1 video and watching season 2 as well.
@zafariqbal92
@zafariqbal92 Жыл бұрын
No, this is good length video, explaining everything in detail. Thank you for this!!!
@niteshrathore4341
@niteshrathore4341 Жыл бұрын
Please continue with this series need this series to be watched by millions of user
@SuperYog008
@SuperYog008 9 ай бұрын
I really like lengthy videos if they are actually going deep into the concepts like you. So please continue doing this and please again start off this season. I am waiting for the other topics
@yasirsarole8654
@yasirsarole8654 Жыл бұрын
Thank You Akshay for creating such videos with in-depth clarity. Looking forward to more episodes of season 2.
@VinodKumar-tq8gr
@VinodKumar-tq8gr Жыл бұрын
Please continue the way you are proceeding now sir. These tutorials are very helpful the way they are. We are not feeling they are lengthy.
@Future_developer___
@Future_developer___ 3 ай бұрын
Your are great teacher my life is changed after watching namaste javascript and my confidence level boost towards coding.
@ashwinnair9862
@ashwinnair9862 Жыл бұрын
Please add more videos thank you so much for these content! Can't have it enough of them!
@pavanyerra5944
@pavanyerra5944 Жыл бұрын
Your playlist helped me a lot in my career. Thanks Akshay
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much Pavan, this means a lot! ♥️
@yogeshsharma5168
@yogeshsharma5168 Жыл бұрын
Don't think about length of the video.. just make videos like this so that we don't have to watch any other video to understand more related to the topic ❤️❤️❤️ Thank you so much for the season 2❤️❤️❤️❤️
@kikish_sabina
@kikish_sabina 9 ай бұрын
Thank you Akshay, you clarified my mind, I really had a lot of confuses before. But u put everything in order and gave clear understanding! I appreciate it and I'll share all of ur videos with my friends, cause your tutorials are really best❤👏👏👏
@chandraprakashsharma1495
@chandraprakashsharma1495 Жыл бұрын
A couple of things which could be added to the video(maybe in the next) : 1) "Catch" is not just for the method like createOrder rejecting things but any error which can occur within the then's callback as well. 2) "then" takes two callbacks for resolved and rejected case, even though that's not a pattern we Devs generally follow and because it's not handled it gets passed down to "catch" . 👍
@dipenchavda6988
@dipenchavda6988 Жыл бұрын
Please bring the next videos as soon as possible we are just loving this series.
@khushalgupta9766
@khushalgupta9766 Жыл бұрын
Hey Akshay ! You are just awesome man ! Loving each second of your video. Please continue and bring more such great videos asap !!
@rutujagaikwad271
@rutujagaikwad271 Жыл бұрын
This is so worth it! Thank you for this.
@swapnilmitpalliwar6631
@swapnilmitpalliwar6631 Жыл бұрын
The way you explain the concepts is awesome. If you can also create videos on oops and solid principals, it would be very useful.
@pratyushkumar5885
@pratyushkumar5885 Жыл бұрын
Now onwards it's super easy to keep promises in mind.😅 Thanks for this amazing content.😇
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Pratyush. This means a lot. Happy Diwali ❤️
@pratyushkumar5885
@pratyushkumar5885 Жыл бұрын
Happy Diwali 🎇🎇
@ElevateExcellence
@ElevateExcellence Жыл бұрын
Great enthusiasm for teaching. God bless you.
@kovendanragupathi7632
@kovendanragupathi7632 Жыл бұрын
Finally I really like you are uploading videos consistently. THANK YOU SO MUCH BRO
@rohanmahajan6129
@rohanmahajan6129 7 ай бұрын
Simply Great this man is, his series is, and also the way he teaches these complex things, makes so much easy for uss to understand, god bless yh man, bro please keep continuing the series!!!
@PumpkinEater6699
@PumpkinEater6699 Жыл бұрын
Consistency at it's best❤️
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Pravin. This means a lot. ❤️
@gvthabalasanmugam9031
@gvthabalasanmugam9031 Жыл бұрын
@@akshaymarch7 please make a video on arrow function
@monikapant3365
@monikapant3365 Жыл бұрын
Linking the lengthy videos too, coz what matters is to cover the concepts and learns thing by deep diving into core concepts. thanks a lot Akshay, for the amazing content and your efforts.. Would love to see more videos on Pollyfills (of promises, map. reduce, filter etc imp concepts)
@maruthiprasad1452
@maruthiprasad1452 Жыл бұрын
The way you simplified the concept is soo good. Thanks Akashay..
@akks6988
@akks6988 10 ай бұрын
Bro thanks for NamasteJavaScript ❤... Please upload next episodes and complete the season 🙏
@poonamchaurasia2484
@poonamchaurasia2484 Жыл бұрын
Really valuable content Akshay!! Thanks a lot for all your endeavor 😊 Looking forward for more such helpful content😁
@sunilkumar-zf4dx
@sunilkumar-zf4dx Жыл бұрын
Making lengthy videos is not a problem at all and thanks for making this video. This is the most important concept in JavaScript. I hope you will cover async and await also 😍 in future.
@Ankitkumar-gh9yf
@Ankitkumar-gh9yf Жыл бұрын
Bhai in form 🔥🔥. Thank you for the content ❤️. Excited for the consistency more power to you ❤️❤️
@darshan221b
@darshan221b Жыл бұрын
Really great video Akshay!! I feel the lengthy videos are good as they go in depth about a particular topic and its never boring with your explanation!
@nitin4598
@nitin4598 Жыл бұрын
Awesome content as usual Akshay. Video length is not an issue at all and I respect you a lot for making such detailed videos on a complex topic.
@stelena-forever
@stelena-forever 5 ай бұрын
Thank you so much Akshay for such amazing learning content❤ I invested in Namaste React course in the end of last year, currently learning new in depth about React. And I am very excited for your future Namaste System Design course and DSA course too. Feel soo good to invest in such amazing courses for growth. ❤
@jitendramistry1241
@jitendramistry1241 Жыл бұрын
These are lengthy videos but are totally worth it. Please keep making similar videos. Don't worry about the length of the video. Just keep doing the good work Akshay. Promise is a very confusing topic, and you are making it very easy. Please make more videos on promises.
@kritisharma4653
@kritisharma4653 Жыл бұрын
great explaination. i never felt this topic so easy to understand before this. i was eagerly waiting for this promise episode.
@muhammadnaveed7953
@muhammadnaveed7953 Жыл бұрын
Akshay you are real champion of JavaScript... Thankyou.. Please keep teaching us... And upload one video daily
@apurvasingh5643
@apurvasingh5643 Жыл бұрын
Big thanks for teaching us the very important Promise concept. Here is the homework code:- const cart = [ { itemName: "Jeans", itemPrice:4000 }, { itemName: "Shoes", itemPrice:8000 }, { itemName: "Socks", itemPrice:400 }, { itemName: "Purse", itemPrice:1500 } ]; let balance = 20000; createOrder(cart) .then(function(orderID){ return orderID; }) .then(function (orderID) { return proceedToPayment(orderID); }) .then(function (paymentInfo) { return showOrderSummary(paymentInfo); }) .then(function (balance) { return updateWallet(balance); }) .then(function (resBalance) { console.log(resBalance.balance); }) .catch(function err() { console.log(err.message); }) function createOrder(cart) { const pr = new Promise(function (resolve, reject) { if(!validateCart){ const err = new Error("Card is not valid"); reject(err); } const orderID = "897650"; if(orderID){ setTimeout(function () { resolve(orderID); }, 5000); } }); return pr; } function proceedToPayment(orderID) { return new Promise(function (resolve, reject) { if(orderID){ resolve({ paymentStatus: true, message: "Payment Successful!" }); } else{ reject(new Error("Payment failed!")); } }) } function showOrderSummary(paymentInfo) { return new Promise(function (resolve, reject) { if(paymentInfo.paymentStatus){ resolve({ status: "success", order: "cart" }) } else{ reject(new Error("Something went wrong!")); } }) } function updateWallet(history) { return new Promise(function (resolve, reject) { if(history){ if(history.status == "success"){ let amount = 5000; balance = balance - amount; resolve({ balance: balance, message:"Updated Balance" }); } } else{ reject(new Error("Wallet not updated!")); } }) } function validateCart(cart) { return true; }
@AhireMahesh
@AhireMahesh Жыл бұрын
Loving and learning your videos, please create such videos..worth watching your videos bro.. you’re awesome ❤
@bloggerayush8550
@bloggerayush8550 8 ай бұрын
What a Quality content yaar. All of my doubt cleared in a single video
@batman28996
@batman28996 Жыл бұрын
I love your content and way of teaching. Please upload more frequently.
@vinaypatil8009
@vinaypatil8009 Жыл бұрын
Too much great information in 1 video. Truly amazing and one of the best channel to learn JavaScript Thanks for everything sir
@Zaheer__zk40
@Zaheer__zk40 9 ай бұрын
great explanation, The Best part that every KZbin teacher should add to their videos is homework as this videos homework, Thanks for creating such great tutorials
@TW-uk1xi
@TW-uk1xi 3 ай бұрын
We really like your videos. I watched a lot of videos before to understand promise but I only got confused. After watching your video, now this promise concept is crystal clear to me. Please don't stop uploading videos.
@ravimalav183
@ravimalav183 Жыл бұрын
Fall in love with your way of teaching.
@shivaliraghav8524
@shivaliraghav8524 Жыл бұрын
Its a great content Akshay! We definitely want to dive deep through examples. Its ok if videos are getting longer as the content is real gold
@Gvkrish52
@Gvkrish52 Жыл бұрын
Bro you are truly legend...you made me fall in love with JavaScript 😂... keep teaching us...lots of respect for you... length is not a matter until unless it has a content..... 🙏✌
@javascriptEager
@javascriptEager Жыл бұрын
Mera bhai, mera dost, mera guru best youtuber for javascript with deep knowledge come back ab koi ni tikega javascript content m because of you.
@pranshuaggarwal
@pranshuaggarwal Жыл бұрын
@akshaymarch7 you are really a good teacher. JavaScript was like a monster I was trying to fight against and conquer, but unfortunately, couldn't learn how to. But you explained the concepts so clearly that I can built something using JS. Thanks Thanks Thanks buddy.
@narayanchatalwar8027
@narayanchatalwar8027 Жыл бұрын
Your videos and your way of explainig is really great . Worth every second ...
@joydipdutta9394
@joydipdutta9394 Жыл бұрын
I am loving this kind of video. This long video is more helpful to understand the concepts. I am waiting for your next video.
@poojalahane2584
@poojalahane2584 Ай бұрын
I fall in love with promises just because of you thank you so much sirr.......... you are best....... i was promiseFobia but just because of you it gone.......... thank you so much agai for making me jorney easy.... you are the best...... i always sleepy when i am doing lecture but just because of you I just addicted to javascript like web series........ after getting job i will definitely contrubute you........... thank you so muchhh..............!❤❤
@jitendramistry1241
@jitendramistry1241 Жыл бұрын
best wishesh waiting for next video . thank you for these videos.
@chandachandramahesh795
@chandachandramahesh795 Ай бұрын
Wah!! Mind blowing lecture
@anuradhahegde2154
@anuradhahegde2154 Жыл бұрын
Amazing course Akshay. Learnt a lot from Namaste Javascript. Everything has been explained so well. If possible kindly explain the working of promises in execution context in call stack.
@sakshimore4275
@sakshimore4275 Ай бұрын
The best explanation on promises ever!
@shubhambarve4785
@shubhambarve4785 Жыл бұрын
Great explanation Akshay. Loved it. Please keep making videos like this. 🙏🙏🙏
@WestcolColombia_
@WestcolColombia_ Жыл бұрын
THANKKKKK YOUUUUUUU, THE BEST SURPRISE, 2 VIDEOS IN A WEEK YEAHHHH
@WestcolColombia_
@WestcolColombia_ Жыл бұрын
I don't understand hahaha, am I the winner? Where do I text you, I'm impressed
@WestcolColombia_
@WestcolColombia_ Жыл бұрын
I see that this comment is also placed on others people's comment too, could you please explain us? Or where is it the link to be redirected to you telegram?
@deepaksai3637
@deepaksai3637 10 ай бұрын
I finished all the videos from season 1 and 2 .....its super exiting and felt very bad that there are only 3 videos in season 2. Please post some super long and advanced topics.Its fun learning from u.
@richeshkunwar2621
@richeshkunwar2621 Жыл бұрын
Hello Sir ! These two promises video made my concept regarding promises very clear. When are the further videos in this series coming. We are waiting for new things to learn from you
@vipulsharma9
@vipulsharma9 3 ай бұрын
You really made me love these things. Thanks a lot Akshay! The way you teach, it feels like I am taking personal coaching from my buddy. You are great brother! I am thinking to complete all React and Javascript courses from you.
@martinjoseph9939
@martinjoseph9939 Жыл бұрын
Thanks!
@akshaymarch7
@akshaymarch7 Жыл бұрын
Thank you so much for supporting my channel, Martin. This means a lot. ❤️
@ankushladani496
@ankushladani496 Жыл бұрын
Loved this way teaching dont worry about length of videos no issues in that.
@mahesh_a
@mahesh_a 11 ай бұрын
Episode 4 Please. Very excited for it :)
@prasenjitbasu6152
@prasenjitbasu6152 Жыл бұрын
Akshay I have watched many videos in KZbin. But the Content is provided in your videos is to the next level. I personally started loving JS after watching your videos. I know you have a very busy life but one request from the bottom of my heart please if you can than please post your videos bit faster and I will also request you to make videos on ReactJS. Thank you from the bottom of my heart your videos inspire many and encourage many to learn JS.
@venkataramyasrikota8126
@venkataramyasrikota8126 8 ай бұрын
Just blown away when you said what happens when we just reject and do not handle errors.
@kamalapriyass2608
@kamalapriyass2608 Жыл бұрын
Hi Akshay, thank you so very much on JS. You won't believe. U achieved ur target of making viewers fall in love with JS. Yes, I already fell in love with JS. All credit goes to you. Thank you once again!! Have you created any video on arrow functions?? If not, can you please create one?? Just want to know its practical importance and how and where it becomes better/advantageous than normal functions in javascript. There are many videos on it but nothing explains from the root of concepts like you?? Thanks in advance!!
@ManishSharma-fi2vr
@ManishSharma-fi2vr Жыл бұрын
Grateful to you!
@tehaamhashmi9636
@tehaamhashmi9636 Жыл бұрын
Really amazing explanation, always eagerly waiting for your video, please keep the consistency.
@abhishekvishwakarma9045
@abhishekvishwakarma9045 Жыл бұрын
No words :) Just amazing you made the promise so easy to understand waiting for more such content 😎🔥🚀
@abhishekvishwakarma9045
@abhishekvishwakarma9045 Жыл бұрын
@Akshay saini sir i think you need to look into this looks scam to me 🤔
@WestcolColombia_
@WestcolColombia_ Жыл бұрын
@@abhishekvishwakarma9045 yeahhhhhh many comments have this reply
@arunshukla5767
@arunshukla5767 Жыл бұрын
I have completed Season 2 just now in one day. I am a very choosy person if I didn't understand in the first 10 minutes then I will skip that video. BUT TRUST ME I started at 1:30 PM and continuously watched till 5 PM. I get a lot of knowledge from you. YOu helped in clearing my doubts. Now I am going to write the blog. ThankYOu Once Again. Please Post next video soon
async await | Namaste JavaScript - Season 02 - Ep 04
1:09:21
Akshay Saini
Рет қаралды 224 М.
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 12 МЛН
He tried to save his parking spot, instant karma
00:28
Zach King
Рет қаралды 17 МЛН
Sigma Girl Education #sigma #viral #comedy
00:16
CRAZY GREAPA
Рет қаралды 91 МЛН
JavaScript Promises In 10 Minutes
11:31
Web Dev Simplified
Рет қаралды 1,7 МЛН
map, filter & reduce 🙏 Namaste JavaScript Ep. 19 🔥
37:42
Akshay Saini
Рет қаралды 845 М.
Promises | Ep 02  Season 02 - Namaste JavaScript
39:06
Akshay Saini
Рет қаралды 427 М.
CRAZY JS INTERVIEW 🤯ft. Closures | Namaste 🙏 JavaScript Ep. 12
32:45
Event Delegation in Javascript | UI/Frontend Interview Question
27:45
JavaScript Promises  -- Tutorial for Beginners
37:05
ColorCode
Рет қаралды 105 М.
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 12 МЛН