Promise then method return value problem.

  node.js, question
function double(value) {
 return value * 2;
 bracket
 function increment(value) {
 return new Promise(function(resolve, reject){
 Resolve(value plus 9);
 })
 bracket
 function output(value) {
 console.log(value);  // => (1 plus 9) * 2
 bracket
 
 var promise = Promise.resolve(1);
 promise
 .then(increment)
 .then(double)
 .then(output)
 .catch(function(error){
 console.error(error);
 });

Definition: Promise then returns a new promise.
In fact, the double method returns an int type and increment returns a Promise object
Double return type does not conform to definition, in which Promise is What?
Is it Return New Promise (Function (Reject) {Resolve (Value * 2)}?
How does Promise distinguish return int, string, Promise to make a layer package?

LookA plus Promise

this.then = function (onFulfilled, onRejected) {
 var self = this;
 return new Promise(function (resolve, reject) {
 return self.done(function (result) {
 if (typeof onFulfilled === 'function') {
 try {
 return resolve(onFulfilled(result));
 } catch (ex) {
 return reject(ex);
 bracket
 } else {
 return resolve(result);
 bracket
 }, function (error) {
 if (typeof onRejected === 'function') {
 try {
 return resolve(onRejected(error));
 } catch (ex) {
 return reject(ex);
 bracket
 } else {
 return reject(error);
 bracket
 });
 });
 bracket

thenThe implementation of the inside method is indeed a return to a new onePromiseWhat did you saydoubleIn fact, it isthenThe first parameter of theonFulfilled