Consider this situation.
new Promise(function(resolve, reject) { var x = resolve(2); });
What value will x be? I tried to
x
The return value of the promise constructor is ignored.
The resolve function also returns undefined.
resolve
This was first specified in the promise constructor spec and later in the ES2015 (ES6) language specification.