ES6 promise execution order
问题 I would expect the output for the following snippet to be 1, 2, 3, 4 . But, the actual output order is 1, 4, 3, 2 . self.promiseChain = new Promise(function (resolve, reject) { setTimeout(resolve, 4000); }).then(function () { console.log(1); }); self.promiseChain.then(function () { return new Promise(function (resolve, reject) { setTimeout(resolve, 3000); }).then(function () { console.log(2); }); }); self.promiseChain.then(function () { return new Promise(function (resolve, reject) {