Avoid Callback Hell with Promises

preview_player
Показать описание
In this lecture, you will learn how to avoid callback hell in your JavaScript program by using promises and chaining then method.
Рекомендации по теме
Комментарии
Автор

Not sure I understand the advantages of promises from this video. Code is just as long and function has less reusability because the countries are hard-coded.

derekreeter
Автор

This is too beautiful. Thanks a whole lot

Babe_Chinwendum
Автор

thx so much for share this content, i have learned alot with your vids, thx alot ! from brasil <3

GGJP
Автор

Sir i have only one doubt, after attaching the callback with the promise object then method return this(i.e current calling promise object) and this attached callback will be executed asynchronously after calls tack is empety and promise resolved, suppose this happens and attached callback is executing this callback will return a new floating promise then how binding then function with this floating promise in promise chaining ?
😖 I am very much confused

bishwajeetpandey
Автор

The code is still looks bad like callback hell. I think Async Await will be look more elegant.

buminkagan