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.

  1. Return a new Promise.
  2. Inside the promise, immediately resolve it with the message string.

Constraints

    AdvancedAsyncPromises
    JavaScript
    Loading...
    3 Hidden

    Input Arguments

    message"Success!"

    Expected Output

    Success!

    Click RUN to test your solution