4 ms·
1) There could be an `await` method already defined on the Promise. It's just an object. 2) `await` can work with anything that conforms to the Promise spec, n
by neilk 8y ago
1) There could be an `await` method already defined on the Promise. It's just an object.
2) `await` can work with anything that conforms to the Promise spec, native promises or Bluebird or what have you.
3) Sometimes, a method doesn't return a Promise, but a value. In those cases, the await syntax returns the value. Can't do that with a method.