Комментарии:
No way, you managed to explain this so quickly with such a good explanation. You truly understood the concept.
ОтветитьDude 🔥 😂 just bought me as a subscriber bcuz I understood thus immediately 😅
Ответитьthanks man good explaning
Ответитьuggh what a superb explanation! Took me months in my uni days to get this
ОтветитьYou are exactly looking like a Rishi Sunak sir
ОтветитьDamn, you are good…
ОтветитьJS and TS is really a stockholm-syndrome kind of vibe huh
ОтветитьCareful, because of javascript's single threaded nature, any hard waits will still block the thread. For example, try putting a sleep() call in the promise
ОтветитьIsn't async and await doing the same stuff?
ОтветитьFor straight 2 seconds I thought this was Rishi Sunak.
ОтветитьLoved this. Pls make more. Better to watch this than all the crap on yt
ОтветитьNice 👍
Ответитьasync await?
Ответитьyou could have just return weather from getWeather it will also be a promise , no need to wrap a promise inside a promise
Ответитьasync await >
Ответитьhahahaha thanks, I'm learning springboot, but I was trying to learn some JS to build very basic UI, I was checking this very specific subject with some some examples but didn't quite made sense, but your example gave me a good starting point, thanks xd
ОтветитьWell explained👍
Ответитьthat take for resolve reject as then and catch, i never thought of that when learning promise since they all use resolve and reject. could've understood it faster if they did it as then and catch in teaching materials/videos/documentations
ОтветитьNah I just do
return true
sounds like python but worse...
why tf do people even use it
❤
ОтветитьNice
ОтветитьAs an Iranian, I am proud of you, Sina.
ОтветитьIts just so much cleaner to avoid all this, make the function async and use the await keyword
Ответитьomg i have learned this sh*t for 3 days and now I understand it in 1 min
ОтветитьGreat explanation.... But just make the code actually fits the screen next video.
ОтветитьYou 're amazing that you can give an explanation of promises in just 1 minute🙏🙏🙏, thanks Sir
Ответитьnow do with async await
ОтветитьI.... understand 🙃
finally
ffs
but we could do this with async await
Ответитьwhat is the theme?
ОтветитьAsync Await left the chat.
.
.
But really nice explanation in this as well as the full video.
Give the link in comment and pin it
I swear JavaScript too my looks like {([<>])} the end of a function is mostly like )};
Then over other languages will end like
}
Calling resolve and reject as then and catch feels like it would make learning about promises a lot easier. And I say this as I work on the monster I created some time ago that is a recursive async and promises stack used to fetch info from different apis and merge them together to start new requests, with some apis being limited to 10 records at a time while I need them all (about 40)…
ОтветитьBetter use async await :)
Ответитьwho wouldnt want to see "jim sarbh" teaching javascript
ОтветитьGreat explanation... Link for full episode please
ОтветитьI hate the explanation that something is wrapped in a promise because it takes time. Iterating to 1e12 takes time yet you're not going to put the loop in a promise.
ОтветитьPromises. Uh huh
ОтветитьDisadvantage of promises: callback hell
ОтветитьTry to solve Hanoi Towers with promises. Every next promise is more clear to the end position
ОтветитьUse async await
ОтветитьWe need a better client side script language. Javascript has been bastardised beyond belief to the point its almost unusable now with writing endless closures around things.
Ответитьsubscribed. Although I am a Java developer
ОтветитьThis is misleading, resolve and reject are not synonymous to then and catch.
ОтветитьPlease do RxJs
ОтветитьThink we can just use async await to get the api response 🤔.. not sure though
ОтветитьPlease tell me how I get those colors in my vscode
ОтветитьJS is weird
ОтветитьI’ve been struggling with async for days, but when he said that a Promise takes two parameters, “then” and “catch”, but that they’re called “resolve” and “reject” I was like OH SHIT! Now it makes so much more sense
Ответить