Syntax - Tasty Web Development Treats cover image

Async + Await

Syntax - Tasty Web Development Treats

00:00

Javascript's Synchronous Promises

It's simply just pausing your code to say hey wait a second wait for this stuff to come back All right, we're wait here it is. And the eventual data that comes back from the promise will be put into your variable So you can do something like const weather equals await go get theWeather and whenever the function go get the weather resolves Whenever that promise resolves Then the resolved data like sunny and 20 degrees will be put in your actual variable That's on your your left-hand side. So there's no um callbacks or any like weird syntax here. It's just simply reads top to bottom which is great because often when we start learning programming Like what are the what are like

Play episode from 11:05
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app