1.5 The Continuation
HTML
<script src="https://rawgit.com/eu81273/jsfiddle-console/master/console.js"></script>
JavaScript
//https://leanpub.com/asynchronous-javascript
var getClient = () => {
return new Promise(resolve => {
setTimeout(() => {
resolve({ id: 1, name: "rick" })
}, 1000);
})
};
getClient().then(client => {
console.log(client.name)
});