Async/Await - Node.js Basics Part 6

preview_player
Показать описание
If you thought Promises were sexy, wait till you see Async/Await.

Hope you enjoyed the video!

Check out this code here:

Join my Discord server to chat with me:

Check out some code on my GitHub:

Tweet me something funny on Twitter:

Say hi over at Facebook:

Sincerely,
Engineer Man
Рекомендации по теме
Комментарии
Автор

Incredible series man. Not too boring, not too nerd, not an asshole, and bringing in depth knowledge easily.

rafaelmartineztomas
Автор

I really like the way you explained async/await. As someone who learned javascript and nodejs out of order I struggled for a while trying to figure out why async/await wasn't just "the best" and that is because I lacked a fundamental understanding of how the code executes.

UnawareBlaire
Автор

man, you're a hero, a life-safer

luxeave
Автор

It not only looks like synchronous programming on other languages, it also looks like Asynchronous programming in many languages, because quite a few use Async/Await (Python, C#, etc).

nrout
Автор

In the first example I see you are using "var" to define the variable run. Is there any reason for this choosing var over let / const? I am new to es6+ javascript and have been told to avoid using "var". Are there any usecases for selecting var? (While this sounds a bit pedantic, it is a true question to understand var)

tylerwhipple
Автор

So what I understand is, nodejs is basically asynchronous programme but using async and await you force it to behave like synchronous programme. Is that correct?

blueman
Автор

I have a question - I have a Windows 10 HP laptop - the wifi will show at (example) 45mps, 2 min later drops to 30, 2 min later drops again, min later etc etc - end up at like 1 Mps. Any ideas or cause? Thanks - enjoy your vids.

vance
Автор

you can also use
(async() => { /* CODE HERE */ })()
to execute async/await code immediately instead of declaring a function

wesselgames
Автор

Pardon my cluelessness but can someone explain to me why we make use the async keyword if we are to later use the await keyword which pretty much makes the action synchronous? In other words are we making something asynchronous only to later on make it synchronous again?

cybr
Автор

In the async.js example, my async "b" function returns a pending promise and I can't figure out why.

dangmannn
Автор

run() isn't an anonymous function it's more a row function anonymous function as are like this on JavaScript ()();

hastaquedanielologre
Автор

function a (){
return Promise.resolve('a')
}

async function b(){
return Promise.resolve('b')
}

async function c(){
return 'c'
}

console.log(a()) //output: Promise{'a'}
console.log(b()) //output :Promise{<pending>}
console.log(c()) //output: Promise {'c'}

why the 2nd out put is showing pending..? @Engineer man

jibanjyotinayak
Автор

That's a lot effort to make async back to sync

maizesoft
join shbcf.ru