Use the awaited value in a calculation
Once you have the value out of a promise with
await, you can use it like any other value. The function getNumber() returns a promise that resolves to 7. Inside the async function double, await that value and return double of it.Premium
JavaScript
Console