When writing async functions, there are differences between await vs return vs return await, and picking the right one is important. This returns a promise that waits a second, then has a 50/50 chance of fulfilling with “yay” or rejecting with an error.

View original article

Pin It on Pinterest

Share This