The Future Promise
Medium+30 XP
Mission Briefing
The Space Station is waiting for a supply drop that won't arrive until tomorrow! You need to program a Promise to handle this future delivery.
The Concept: Handling the Future
A Promise is an object representing the eventual completion (or failure) of an asynchronous operation. You create a Promise by passing an "executor" function with resolve and reject arguments.
The Objective
Your function receives a string message.
- Return a new Promise.
- Inside the promise, immediately resolve it with the
messagestring.
Constraints
AdvancedAsyncPromises
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
message"Success!"
Expected Output
Success!
Click RUN to test your solution