What is the difference between await/async and .then() in javascript?
Anonymous
They are functionally similar (both work with promises), but await will wait for the promise to produce a result before continuing to the next statement. .then() accepts a callback instead. await/async tends to produce more readable code, but cannot always be used if you e.g. want to run two series of events at the same time.
Check out your Company Bowl for anonymous work chats.