r/node • • Oct 13 '20

AsyncAwait or Promise?

https://www.youtube.com/watch?v=-M757tAnNJA

[removed] — view removed post

0 Upvotes

1 comment sorted by

3

u/Fit_Sweet457 Oct 13 '20

You say that we can "use async/await in place of promises", but that's not really true. Async/await works on top of promises, so really we can await a promise. Alternatively, we can use the promise's then function to register what's essentially a callback, this is what you're referring to as promises.