var r = null; Promise.all([Promise.resolve(1), Promise.resolve(2), Promise.resolve(3)]) .then(vs => { r = vs[0] + vs[1] + vs[2]; }); __drain(); r