4 ms·
Promises and, more recently, Observables. Simply put: A promise resolves to a single value asynchronously, an observable resolves to (or emits) multiple values
by awjr 10y ago
Promises and, more recently, Observables.
Simply put: A promise resolves to a single value asynchronously, an observable resolves to (or emits) multiple values asynchronously (over time).
Taken from here:
http://stackoverflow.com/questions/36064303/what-are-the-differences-between-observables-and-promises-in-javascript http://stackoverflow.com/questions/36064303/what-are-the-dif...
- awjr 10y agoOh I also forgot async/await "The purpose of async/await functions are to simplify the behavior of using promises synchronously and to perform some behavior on a group of Promises. Just like Promises are similar to structured callbacks, async/await is similar to combining generators and promises." https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...