Thank you for explaining and teaching me this topic. I found it useful and very helpful for learning asynchronous JS.
@TomiokaGiyu48 ай бұрын
Actually, using try..catch inside async functions is the proper way to handle errors. You figure out the part that threw the error, modify the error message, and rethrow the created error from the catch block if you need to use then.catch
@lindatochukwu30815 ай бұрын
hello Ahmad, I am new to programming, pls can u be my mentor?
@helloworldkudasai Жыл бұрын
thank you.. this is very easy to grasp
@muppallaramoji7871 Жыл бұрын
Thank you so much The video explains crisp and clear saw numerous videos but got clarity here 🙏🙏
@SoftwareDeveloperDiaries Жыл бұрын
Glad it helped! :)
@vishalupadhayay6391 Жыл бұрын
You should add one statement in the video saying "await keyword is used to resolve or reject the promise and as long as it's not resolved/reject the code execution is not blocked. The other code continues execution"
@Prixzlex Жыл бұрын
Then how do I make the rest of the code hold till execution of await is completed?
@yt-11613 ай бұрын
Mate I thought .then() would also return a Promise, but here it's not showing that. The promise it's immediately resolved to a value, is this the reason ?
@vladguzun2522 Жыл бұрын
thanks , now it's a bit more clear
@SoftwareDeveloperDiaries Жыл бұрын
Glad it helped
@StackDeveloper_11 ай бұрын
Brother i have which shall i choose as backend language
@spondoolie64503 ай бұрын
node
@aram86392 жыл бұрын
I hope you make more videos about web, JavaScript and Python 🐍. I like your explanation and I hope you share some experience about your Job in Germany 🇩🇪 🎉
@SoftwareDeveloperDiaries2 жыл бұрын
More to come mate! Thanks for your support :)
@glan-tucan4 ай бұрын
Actually it's not that await .. catch has precedence, is that you already captured the error inside the getBrokenPizza function. To catch it at the module levele you would have to rethrow from the catch block. You can invert the example use then().catch() inside the function and await..catch outside and the one inside the function will still have "precedence" because the error has been captured there
@samucancld Жыл бұрын
good explanation, still hating it, I think observables or promises are way better