The Async Gatekeeper

Hard+35 XP

Mission Briefing

The ancient mainframe operates too slowly! You must act as the Async Gatekeeper to patiently await the data from the mainframe's promise, and then pass it along.

The Concept: Async/Await

The await keyword pauses the execution of an async function until a Promise is settled. It allows you to write asynchronous code that reads like highly readable synchronous code!

The Objective

Your function receives a promise object.

  1. Use await to pause and extract the resolved data from it.
  2. Return that extracted data.

Constraints

    AdvancedAsync
    JavaScript
    Loading...
    3 Hidden

    Input Arguments

    promise"___FN___:return Promise.resolve('Data')"

    Expected Output

    Data

    Click RUN to test your solution