I am quite confused between these two ways of returning the promises, could someone please explain the difference? I tried to find some whereabouts on google, but couldn't find the exact match.
var a = Promise.resolve('foo');
return a.then();
vs
return Promise.resolve('foo').then();
There's nothing promise specific about this.
return a.b();
Is the same as:
var c = a;
return c.b();
In this case a
is Promise.resolve('foo')
.