Reading: Class03 Promises - mwilkin-401-advanced-javascript/bend-javascript-401d2 GitHub Wiki

Promises are a complex topic in JavaScript but extremely powerful and useful. They are like a placeholder for a future value, which may or may not be returned and they are also be seen as flow-control mechanism.

Promises can be resolved (fulfilled) or rejected (unfulfilled). Once a Promise is resolved, it becomes an immutable value or a value that cannot be changed but can be referenced or observed repeatedly.

Promises are the link between the producing code and the consuming functions which reveive the result or error. The consuming functions can be structured using .then, .catch. and .finally.

Promises are a challenging and complex concept. They grant a tremendous about of control by allowing us to perform certain operations in a natural order. Additionally promises can be chained together or called as many times in a row as necessary/wanted. Importantly, promises provide better code flow and flexibility.