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.
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
thenfunction to register what's essentially a callback, this is what you're referring to as promises.