When you're self taught your knowledge is all around the place, like you know classes, instantiation, scope, ES6, and a bunch of advanced stuff but don't know basic stuff like git. I'm in the middle of a very async heavy project on Express and was having a hard time with promises. I decided to take the WHOLE day off to look into it and it only took me 11 minutes thanks to this video. Now I can go back to my project with an extra day on my deadline. Thanks man, that was awesome!
"When you're self taught your knowledge is all around the place". Yeah, that's where I am with a lot of coding. I've been using 'async... await' and 'fetch' without really understanding the underlying 'Promise' object. Makes a lot more sense now!
Sorry for my nooby question, i am more python guy, just starting my journey into js. But i didn't get what for you need "promises"? Why you just don't use "if statement"?
I’ve commented before, basically the same thing, but I REALLY enjoy your style of teaching. To the point, understandable examples, and clean code. This is by far the best video on Promises I’ve seen yet. Thank you!
After watching crashcourses, long, 45 min videos and articles about promises, I can say this is probably the only video that actually made me understand promises. Wonderfully explained! Thank you so much, you have a new subscriber :) And also... The amount of dislikes says it all.
I started learning development with udemy courses. It all went great and I've been through 2 interviews so far. In one of the interviews they told me to learn the theory behind promises and it turned out that I've used it many times but that video really helped me solidify the knowledge and understand the actual logic behind them. I always seek your short and straight-to-the point tutorials for similar cases. Thank you.
Dude.... that was a CLEAN tutorial. I can easily go back and watch it a few times to practice it. Writing a promise to console log 1,2 and 3, in order, asynchronously , was an interview question. I watched your video to re-learn the syntax. Thanks!
I've been binge watching your videos and they are wonderful. Not too long and not too short while delivering the content clearly. Keep up the good work!!
Just a reminder that Callback Hell IS a real place where you WILL be sent at the first missing curly brace. In all seriousness though, great walkthrough!
there are many webdev videos on youtube but what i like so much about yours is how calm you bring every thing (there is a general hyperactivity trend on youtube i think). videos are very clear as well. thanks so much :)
I watched 4-5 other videos about callbacks, promises before watching this video, was not satisfied. I am very much satisfied with your explanation in just 10 mins. Great 👍
Thank you! I try to make all my videos as concise and informational as possible. My goal is the be the channel with the most learning per minute of content.
Great explanation of promises, Kyle! Using Promise.all and Promise.race really helps in managing multiple asynchronous operations efficiently. For those looking to write cleaner and more maintainable code, promises are a game-changer compared to traditional callbacks. Thanks for breaking it down so clearly!
Awesome! I have been struggling with this subject for a whole week. I read every resource I could find on the internet. This video finally made me understand promises in a matter of 5 minutes.
This tutorial was like revisiting form basics to learn to pro. I read some articles about Promises and I sort of knew what this was about. But the way he gave the example, this just got stuck in my mind. thanks man
Yeah. This is the best video from my Async JS marathon. Superb, right-to-the-point and practical explanations. You did, pal. One more subscriber. Keep up the good work!
I really went down the rabbit hole with this one... Was initially learning about CPU hyperthreading and got confused between concurrency, parallelism, and sync and async tasks. Learning that introduced me to asynchronous code, which finally led me here. I don't even know JS lol. Really good video! I found this quite interesting.
Man, you are one of the best instructors I had the pleasure to watch teaching. Your videos worth more than tenths of hours of paid courses. Thank you a lot and greetings from Brazil!
Thank you so much! Sometimes, if I find topics complicated, I feel like I can't breath and take lots and lots of break. lol. But this tutorial makes it easy to understand the topic.
Also the .then can take two functions as arguments. The first one being done on resolve and the second one for reject. .catch is the same thing as .then(null, reject)
.catch is not exaclty the same, becasue you can use different a "reject" for every .then, and use a common .catch at the end of the chain to catch any unhandled error.
Probably the best video on RU-vid that explains promises in such a lucid fashion. Liked, commented, subscribed and shared as well. Keep up the good work man.
You just saved me man. I've been reading my course material over and over, watching their videos for days and I wasn't computing a thing. You're doing the Lord's work, Bravo!
How do you speak so flawlessly without pauses or ticks, all while typing out code with very few mistakes? Was this all one take? This shouldn't be possible
This is amazing! Thank you so much 😊. You explained this perfectly. I have been trying to learn this for weeks and I’ve been failing but I just learned it in 10 minutes! I completely understand this now, thank you! YOU HAVE A NEW SUBSCRIBER 😄😄
Fantastic explanation! My only feedback is to increase the font size in your editor for those of us watching on mobile (and I'm sure desktop would benefit) when doing these smaller examples. Would be a lot easier to read.
normally i don't pass the comment on youtube but after watching this videos, i did't control myself coz i watched too many videos to understand what actually promises do but end up with disappointed but u just nailed it thank u so much.
Thank you so much for your videos! You have a great talent for teaching :D I wish college teachers were like this, mine would only read their PPT in class :(
i seriously watched so many fucking videos on that topic and never wrapped my head around it... you took 10 minutes and now i feel comfortable to play around with it.. thank you.
The promise code for the first example gave me a “Promise {}” when a = 2. It gave me the correct result when a = 3. Ran straight and with localhost. Both were the same, thoughts?
It sounds like your promise is never calling resolve or reject. You might want to check to make sure that your if logic is correctly setup so that either resolve or reject are always called inside your promise.
Promise has three states which are; 1. Pending, 2. fulfilled and 3. reject. when you defined a promise in a function, that function remains in a pending state untill you run the code and now result in a certain condition base on your logic, that is when the function will enter into being fulfilled or rejected.
@@WebDevSimplified While I like it, I consider it a bad practise whether it's allowed or not. But I find JS rather messed up anyway. -- Don't attack me on it though, I use it when needed (Which is currently using NodeJS + Electron).
Why do all coding tutorials have these comments like 'super simple explanantion' "best video ever" ...no matter how bad the explanation was. It will always be a mystery to me
Ok. Two things: 1) slow down about 2-3x. 2). As someone that is being forced to take JavaScrip for a CS major, I can't help but notice how terribly JavaScrip is compared to other programming languages... literally feels like a house made of scraps ... there just isn't any clear consistency or common sense built into this language ... it's all just a bunch of strung together libraries and weird syntax that was build over whatever was there before ... everything seems to be based on word of mouth and experience rather than the structured and consistent approach used by other programming languages. I thought Python was terrible, but JavaScrip takes it to the next level of confusion. Somehow the claim is that this makes things faster and easier, but all I see is a bunch of unnecessary complexity that could be simplified by going back to the basics.
Dude Javascript is a language that was built for browsers initially.Today the many versions of JS introduced new syntax which is confusing but there is a reason behind the weird things of JS. Its cause of 2 things they are doing at the same time, one is they don't want to break the code written a long time ago another is they are making development easy for the devs by implementing new features and syntaxes..Javascript should have a backward compatibility always.
I am an experienced developer but haven't used promises till now, there was piece of code I was trying to make sense from another developer and he as using promises. This video really help me in this regard. Thanks
I have spent so long trying to fully grasp node promises and this video really really explained it such an understandable way, you have earned yourself a new subscriber! :)
It`s been such a challenge to understand Promise, callbacks, tasks, schedules, async/await ugh!! This explanation was the clearest one so far! Thank you !!
i started with the full stack course but have digressed 4 videos now in order to catch my knowledge up. thank you for referencing these videos that contain the requisite knowledge i didnt even know i was looking for!
Was reading the MDN article over Promises and half way through I was already falling sleepy. decided to come here instead and understood it lol. Thanks m8
I'm probably going to watch this again. Then in 2 days, and in 2 months, I'll watch it again. And again. Because I'm quite thick, but this made a lot of sense and was clear and concise.
You sir are an f-ing genius at explaining things. I bought your JavaScript beginner videos on your website. I have gone through codecademy, team tree house, JavaScript book and you are by far the best person to teach. 😀
Bro I've been working on this promise shit for probably the past 15 hours and your video literally did it for me can't thank you enough dude. You also look identical to my buddy irl so this was an experience to say the least.