This commit is contained in:
Ilya Kantor 2017-05-01 11:44:56 +03:00
parent a68022a8d6
commit 04b2fcfba2
17 changed files with 304 additions and 137 deletions

View file

@ -0,0 +1,19 @@
'use strict';
new Promise()
.then(result => {
return {
then(resolve, reject) {
setTimeout(() => resolve("two"), 1000);
}
};
})
.then(result => {
console.log("HERE", result);
return result;
})
.then(console.log)
.catch(err => console.error("ERROR", err));
// https://tc39.github.io/ecma262/#sec-promise-resolve-functions