hi techsith, I would like to thank you with my whole heart. I have followed your video for my JavaScript knowledge and switched my job where i got unexpected 100% hike in my current salary. Your videos are so well explained that i can't explain i can only say that in my current team i have referred you video to many people and they are also loving ur series.
Hi Vicky Bhai m javascript/react m job search Kar raha hu Agar apke Paas time ho to meri thodi help kar dijiye Kaise kya kitna karna h jisse interview nikal jayega Email is Work42sandeep@gmail.com
You made this hard topic fewer easiest, because of your examples from real life, it's a big plus for you, that makes me watch your video and understand the topic of the video. Thank you for you :)
i have seen many videos trying to explain Async Await(all of them just show a async func but never explain or show why ths func is Asynchronous when the await clearly blocks the code in there example) and this is the best one by far how the hell this dosent get more views ?
very nice and simplified as usual good job my friend. although i think the ticket and the movie example is way to specific and realistic did it happen in real life :) ? keep up the good work
What I like the most about your teaching approach is that you translate coding language into real life experience which is crucial for beginners to understand. Here's a new subscriber for you :)
I wanted to simulate a delay in the promises in the 1st example, buts setTimeout would only work in promiseWifeBringingTicks and not in the other promises. Why is that happening?
@@Techsithtube I don't have that code right now. But I can send you my own implementation here github.com/giorgoslytos/promises . It is the promises.js file. I managed to make it function the way that I wanted. And it is a little bit different in the structure and I think it's a little bit closer to reality because promiseWifeBringingTicks is called first, and then the rest are called from it.
Thank you soooo much. You break down hard to understand concepts in the most simplest form. After I found your channel my understanding of JavaScript really improved. :)
maybe a silly question but i cant get my head around, when you return the t you use inside the dollar sign( $ shows its a variable) but when you call the function down and console it you just use console.log(t) i mean just t rather ${t}
if you are using template string which mean someting like this `hi i am ${t}` this is where i am using doller sigh. but i I just want to print t I can simply use t.
Akshay, async await is not syntactical sugar, it's an actual feature. Its an apple an orange comparison, though async await always returns a promise. Which means it uses promise.
@@Techsithtube but they actually do the same thing then what's the difference between them. Just the readability? How they are different from each other functionally? This is what I want to know.
Thank you so much..referred so many blogs and videos for async await but never understood as good and precise as i did after watching this..What a explanation and relevant example ..this helped alot!
Simple answer. if you want to block, you use async await. promises are non-blocking. Imaging if you write some end-to-end tests where you have to load the page , makesure its loaded before you click on the button and make sure it opens another page before you click on that page. all of this is very simple with async await since it blocks every execution.
please what's the difference, why you didn't apply async await on promiseWifeBringingTicks to show us that the script wait the 3 seconds and then it continue the other executions ?
It all depends on how you want to handle the fails, if you care about the fails put them all in promise.all. if there is a dependency . you call one after another.
can somebody please explain where I need to put the word 'return'? because the first promise didn't need return whereas the rest of the promises did... I thought => includes 'return'
But what was the difference Both the methods are giving same results. So do we use it to code look little cleaner or do it have any other benefits? I thought that by using async await we can make code to wait and then execute.
Thanks. I know these are didactic examples, but in a real life, does it make sense to use promises for loading user form, input data, and verify, because if you need to wait before continuing your process. For me it does not make sense to make those requests async.
for loading the data in the user form should not be a promise. and same goes for verifying the data. However, if you are loading the data from response from a rest api. you have to wait for the response to be returned so you need to use promise there.
You do such a great job of clearly explaining a process! With real life examples to help convey the concepts--like mnemonic techniques. Hope you come back to make more tutorial videos!
Nice one, would you mind making the font size a bit smaller, I mean zoom out, because eyes cant see them all at once, hard to read/imagine the whole thing with this font size...
I am confused about JavaScript's blocking behavior. Is JS really non-blocking? Consider the following example: alert('Foo'); console.log('Bar'); If you execute the above code, the second statement never gets executed until the first statement is executed, meaning that the program "waits" for you at line 1. Hence the execution is blocked for as long as the user doesn't close the alert dialog.
Tanmay, to answer your question , JavaScript is non-blocking if you use use the right things that are non-blocking. alert is on of those blocking things that was added long time ago before they consider javaScript non-blocking. unfortunately you can remove anything from javaScript once you add .
Thank you so much for making me clearly understand this topic , I have been struggling so hard to use it in my code since many days. Now that have understood I can use it .💕
much 'awaited' video.
hi techsith, I would like to thank you with my whole heart.
I have followed your video for my JavaScript knowledge and switched my job where i got unexpected 100% hike in my current salary. Your videos are so well explained that i can't explain i can only say that in my current team i have referred you video to many people and they are also loving ur series.
Hi Vicky
Bhai m javascript/react m job search Kar raha hu
Agar apke Paas time ho to meri thodi help kar dijiye
Kaise kya kitna karna h jisse interview nikal jayega
Email is
Work42sandeep@gmail.com
@@SandeepKumar-cx7cz maine email kiya hai apna number kabhi bhi cal kro
@@vickykumar-fb8td hello i know a friend of mine who is also looking for new job as its difficult to get a job a. fresher. can u please help ?
This guy has done mastery in making easy topics looks like most difficult thing ....
Poor guy is never going back to the movies again
lol
The best async await tutorial i have ever seen. Thank you!
After watching quite a few tutorials on this subject, I can say that this is by far the best I've come across! Thank you!
I appreciate your awesome comment. Thanks for watching!
I agree with you. This is gold
I have tried very hard to understand promises and async . this is a saviour . Thanks so much
This is the best video i've seen on this topic. Even in 2021 this is the best!
You can't have butter without popcorn , funny explanation , you just nailed it , thank you
Thanks for watching Wael :)
I really liked the idea of "movie queue" that you used to explain async/await.
Great video.
Glad you liked it! I was thinking a best way to explain it and It seems , real life examples are best way to explain.
You made this hard topic fewer easiest, because of your examples from real life, it's a big plus for you, that makes me watch your video and understand the topic of the video. Thank you for you :)
You're my go-to-guy, thanks for the vid.
You have one of the best youtube channels man... keep on
Your tutorials are masterpieces! :D
Thanks for a nice comment Daniel.
Example was great. And the way you explained it made the topic a lot clearer. Thank you Sir
i have seen many videos trying to explain Async Await(all of them just show a async func but never explain or show why ths func is Asynchronous when the await clearly blocks the code in there example) and this is the best one by far
how the hell this dosent get more views ?
I am glad you think so. Keep on learning!
hard for single, happy fellows, to understand!!!!!
Thanks Very Much. I just like all your videos. Its self explanatory, very well explain. Thanks once again.
cleared all concepts at once...great
I am glad that was cleared. Keep on learning!
wow, excellent , feeling very very good even many developers doesn't know actual behind
Thanks Bharat, for watching!
You earned my respect from bottom of my heart.Thankyou so so much sir.Really impressed
Thank You
THanks for watching Sailesh!
That's great explanation sir..keep it up!!!
Thanks for your presentation. Very helpful. Much appreciated.
I have to say that this is so far the best tutorial on this subject...thanks a lot for sharing your knowledge with us....great video
I like the cinema video example! Thank you.
Your videos are great! Thanks you.
hi sir,
one doubt in 11:55 in async function there is no any time delay then why its vonsole at last?
Thank you !!
This is the best video ever :)
your example was good, easy to understand Promises, but it became very complicated to understand main point async/await
very nice and simplified as usual good job my friend.
although i think the ticket and the movie example is way to specific and realistic
did it happen in real life :) ?
keep up the good work
George, I has happened to me. I am assuming it has happened to lot of other people too and I am not alone in this one. :)
@@Techsithtube of course it happened don't worry you're not alone 😂
You're a good teacher brother. Kudos
actually i knew how async await works, but i want to point that you are the best js tutorial creator in youtube, thank you very much for your work :)
:) thanks for the nice comment
Great example to understand 👌
Deepak , thanks for watching!
thank you so much for all your videos. Respect for your work.
What I like the most about your teaching approach is that you translate coding language into real life experience which is crucial for beginners to understand. Here's a new subscriber for you :)
I wanted to simulate a delay in the promises in the 1st example, buts setTimeout would only work in promiseWifeBringingTicks and not in the other promises. Why is that happening?
can you send me the code on how you are using the settimeout
@@Techsithtube I don't have that code right now. But I can send you my own implementation here github.com/giorgoslytos/promises . It is the promises.js file. I managed to make it function the way that I wanted. And it is a little bit different in the structure and I think it's a little bit closer to reality because promiseWifeBringingTicks is called first, and then the rest are called from it.
The video is slowly but more importantly, it's so understandable and precise! Thank you.
Simple and Clear .. It became very easier to understand with the "cinema ticket queue" example you took.
Genius channel 👍🏼
Thanks for such a detailed explanation.
Thanks for watching Aakriti!
Thank you soooo much. You break down hard to understand concepts in the most simplest form. After I found your channel my understanding of JavaScript really improved. :)
Your stories are brilliant
awesome explanation as usual ..with practical example
maybe a silly question but i cant get my head around, when you return the t you use inside the dollar sign( $ shows its a variable) but when you call the function down and console it you just use console.log(t) i mean just t rather ${t}
if you are using template string which mean someting like this `hi i am ${t}` this is where i am using doller sigh. but i I just want to print t I can simply use t.
Very nice explaination, big thanks!
Nice explanation 👌👍👍
wow . beautifully explained
Thank you sir.. well explained..
Excellent video.. the example is great to explain the concept ! This man knows the struggle with women XD
Thank you Sir. you explained very well.
You saved my time
THANKS :)
Excuse me, please what font are you using in this video?? Thank you sir.
Is asycn await just the syntactical sugar around Promises or are they different from each other in any manner? Please some one help me clarify this.
Akshay, async await is not syntactical sugar, it's an actual feature. Its an apple an orange comparison, though async await always returns a promise. Which means it uses promise.
@@Techsithtube but they actually do the same thing then what's the difference between them. Just the readability?
How they are different from each other functionally? This is what I want to know.
Thank you so much..referred so many blogs and videos for async await but never understood as good and precise as i did after watching this..What a explanation and relevant example ..this helped alot!
Nice Explain
Awesome
thank u so much sir
Thank you very much man. You explained it with so much simplicity, it's just imprinted in my mind. Great job 👍
Soham, If its imprinted in your mind, my job is done. Thanks for watching!
Txx a lot. Love your simple approach.
Thanks for watching! :)
Awesome videos sith
Thank You, Sir,
Full respect and
Best regards
Dimitar
Very nice presentation sir
im confusedddddd....i just need a simple answer, what is the point of async await if we already have promises? :(
Simple answer. if you want to block, you use async await. promises are non-blocking. Imaging if you write some end-to-end tests where you have to load the page , makesure its loaded before you click on the button and make sure it opens another page before you click on that page. all of this is very simple with async await since it blocks every execution.
please what's the difference, why you didn't apply async await on promiseWifeBringingTicks to show us that the script wait the 3 seconds and then it continue the other executions ?
How value of t is updated ?
Could you please explain how we should handle a scenario in which four promises being called and two of them got failed.
It all depends on how you want to handle the fails, if you care about the fails put them all in promise.all. if there is a dependency . you call one after another.
Well explained....as expected from you sir..
Great video. Pretty explanatory both of how async / await works and more importantly, how annoying wives are.
lol I would not comment on the last part :)
can somebody please explain where I need to put the word 'return'? because the first promise didn't need return whereas the rest of the promises did...
I thought => includes 'return'
in the arrow functions you dont have to use return if you are returning a single line.
Brilliant Tutorial thanks
Wow, you really put great effort into coming up with good examples to explain a topic
man u are awesome !
Clear clean and neat
thanks a lot man , was just thinking about this
Thank You so much, sir!!! So helpful!
is javascript blocking and non-blocking in nature??
magnificent video!!! THANK YOU SO MUCH !!!!
that is very practical... thanx
Do you have one for Promise and do you have some practice questions?
But what was the difference
Both the methods are giving same results.
So do we use it to code look little cleaner or do it have any other benefits?
I thought that by using async await we can make code to wait and then execute.
Both, If you noticed, its waiting for things to finish before moving to the next statement. And that make your code look cleaner.
In console why it is showing wrong lines like 89,92,93but in your program lines are 18,20,23 something wrong
Thanks man. Great stuff.
Well explained topic....
Fantastic explanation!
Is this based on your real life experience? If so you deserve credit for your relationship skills as well as your teaching skills ;)
Thanks. I know these are didactic examples, but in a real life, does it make sense to use promises for loading user form, input data, and verify, because if you need to wait before continuing your process. For me it does not make sense to make those requests async.
for loading the data in the user form should not be a promise. and same goes for verifying the data. However, if you are loading the data from response from a rest api. you have to wait for the response to be returned so you need to use promise there.
Thanks. Subbed and liked. Keep up the great work. :)
you are gold 💛
You do such a great job of clearly explaining a process! With real life examples to help convey the concepts--like mnemonic techniques. Hope you come back to make more tutorial videos!
This is very nice example I like it.. can you please explain observable with the same example?
Nice one, would you mind making the font size a bit smaller, I mean zoom out, because eyes cant see them all at once, hard to read/imagine the whole thing with this font size...
Nesae, i will keep that in mind for the next video. thanks for letting me know.
@@Techsithtube Thanks heaps, thanks for the amazing videos, I always learn a lot :)
U doing really amazing job,I like all of us videos,especially javascript mock interviews, it helped a lot,thanks for ur videos
I am confused about JavaScript's blocking behavior. Is JS really non-blocking? Consider the following example:
alert('Foo');
console.log('Bar');
If you execute the above code, the second statement never gets executed until the first statement is executed, meaning that the program "waits" for you at line 1. Hence the execution is blocked for as long as the user doesn't close the alert dialog.
Tanmay, to answer your question , JavaScript is non-blocking if you use use the right things that are non-blocking. alert is on of those blocking things that was added long time ago before they consider javaScript non-blocking. unfortunately you can remove anything from javaScript once you add .
Thanks:) very well explained sir.
Thanks for watching Zakir!
What plugin and IDE are you using that it autocorrects misspelled function/variable names?
than you sm, this really helped
Great tutorial! (:
great example
which texteditor you are using?
I am using JS fiddle.
Your story here sounds like you are speaking from experience, haha. My next Promise would be for us to setTimeout :D
Await thumbs up...
Excellent one. Thanks
Thank you so much for making me clearly understand this topic , I have been struggling so hard to use it in my code since many days. Now that have understood I can use it .💕
Sir is it necessary to use promise??....i think we can handle this types of situation using if-else statement
Yes for anything asynchronous you cant simply use if else. it wont work .