Declare an async function
You just learned that the
async keyword turns a regular function into one that returns a promise. The function below returns the value 5 directly, so logging the call prints 5. Add the async keyword in front of the function declaration and run the code again. The output should now show a Promise object instead of the raw number, because async functions always wrap their return value in a promise.Premium
JavaScript
Console