Chaining .then() calls in ES6 promises
问题 I thought it was supposed to be possible to chain the .then() method when using ES6 Promises. In other words I thought that when a promise is resolved the value passed to the resolve function should be passed to any chained then handlers. If this is so how come value comes back undefined in the chained then handler below? function createPromise() { return new Promise((resolve) => { resolve(true); }); } createPromise() .then((value) => { console.log(value); // expected: true, actual: true })