Work in progress. For now its just a collection of notes until I can assemble this into a tutorial.
-use to react to eventual result of async action
-use .then method
-three states: succcess, rejected, pending
asyncLookupPrice(1234).then(function (price) { console.log('The item costs: ' + price); return price }) .then(function (price) { console.log('Double the price: ' + (price * 2)) }) .catch(function (error){ console.log('Could not find an item with that ID') })