Callback Hell vs Promise Chaining in Javascript ES6 - 28

preview_player
Показать описание
In this video, you will learn about Callback Hell vs Promise Chaining, what is callback hell and how can it be avoided in Javascript ES6.

Note: Just simply change function GetEmployeeCode to GetEmployee to be more Specific.
Рекомендации по теме
Комментарии
Автор

excellent vdo bro...keep up...dont bother about dislikes, ,since they are from beginners.

starc
Автор

hi .. can you explain how it can be converted to async / await to make it more readable ?

kedarkulkarni
Автор

Using async and await, without chained should be like this:

async function doWork() {
const $getUserName = await getUserName()
const $getAge = await getAge($getUserName)
const $getDepartment = await getDepartment($getAge)
const $getEmployeeCode = await
await printInfo($getEmployeeCode)
}
doWork()

yordi-torres-mlwx