From: db...@google.com [mailto:db...@google.com] On Behalf Of Dan Beam

> So just pass no argument at all (i.e. arguments.length == 0)?  I was under 
> the impression some type of value should always be returned (but I'm biased 
> by blink/v8's current implementation).

It's equivalent, both for promises and for return values of functions. Both 
`new Promise(resolve => resolve())` and `new Promise(resolve => 
resolve(undefined))`  give a promise whose fulfillment value is `undefined`. In 
this sense `resolve` behaves like all non-evil JavaScript functions, where evil 
is defined as "checking `arguments.length`" ;)

Reply via email to