What if we don't return a Promise object in an async function?

Question

In this exercise, it says that the async keyword will ensure that the function returns a promise. What if we don’t return a Promise object in an async function we define?

Answer

Even if you do not return a Promise object in a function defined with async, it will automatically wrap the return value in a resolved promise.

For example, say you defined the function

async function example() {
  return 10;
}

This will return a resolved promise with a result of 10.