The A sinkkeywordjustsays, Hey, doallthatstuffkindofinvisiblybehindthescenesforme.
Sonowif I comebackoverhereand I tagthisfunction, basicallyattackingisthewrongword, but I modifybygivingthisfunctionofmodifier a sink.
I saythisisan a synchronousfunction.
It's goingtoexecute a synchronouslyandandwhenandreturn a promise.
Afterall, afterhowevermanycallstoawaitthat I want.
Sonowletmejusthitrefreshhereandthisworksagain.
Sothisnowisanasynchronousfunction.
Sothisandthereasonwhythisisexcitingis I canstarttodothisso I cansequence a bunchofthingsthatare a synchronousthatandandandsomeofthesemightactuallyreturnsomething.
Andthisnow, insteadofhavingtochainallthesedifferentpromiseswiththendotTenndotthenthatthenthatThencatchthiscatchthat I couldjustdoitallinonefunctionandthatfunctionwillreturn a promise.
So I think I don't knowhowmuch I don't knowifthiswasthatusefultoyou, hopefullygivesyoukindof a sense, but I think a practicalexamplewillmake a lotmoresense.
Soifyourememberthisparticularexample, lookatwhat I hadtodohere I hadtofetchfromwordNick.
ThengettheresponseconvertedtoJason.
Thenconvertthat.
Thengetthewordoutofthat, thengotoanother A p I I'm goingtorewriteallofthisinanasynchronousfunctionusing a wait.
And I thinkthat's goingtohelpmakethingsmakemoresense.