CSC360: Promises [1/2] |
Don't expect everything to happen instantaneously!
Instead of calling functions and synchronously waiting for the result, use promises.
Promises are very good for actions that are either resolved successfully or rejected with an error or exception. Later in the class, we will consider RxJS Observables which can additionally be cancelled.
I will walk through slides 1-35: Promises Promises (video)