javascript and promises code example
Example: promises in javascript
myPromise.then(
function(value) { /* code if successful */ },
function(error) { /* code if some error */ }
);
myPromise.then(
function(value) { /* code if successful */ },
function(error) { /* code if some error */ }
);