Question about "Introduction to Promises"

There’s a statement I’m confused by on the tutorial page “Introduction to Promises”:

The implicit await of promises only happens across cell boundaries. So, if you create a promise and then refer to it within the same cell, you’ll see the Promise object and not the resolved value:

However, in the following cell, if I change return promise + "world!"; to return promise;, the value does resolve after 3 seconds.

Does this mean that this simpler reference is not an “implicit” await but rather an explicit one?

When you say return promise; there’s no implicit await; the cell returns the Promise. But, it looks equivalent to return await promise; because the inspector waits for the returned promise to resolve before displaying the value.

1 Like