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.
- Use
awaitto pause and extract the resolved data from it. - Return that extracted data.
Constraints
AdvancedAsync
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
promise"___FN___:return Promise.resolve('Data')"
Expected Output
Data
Click RUN to test your solution