CodeWithMMD

Home
Challenges

Use .finally() to log 'Finished loading' after the promise is resolved.

Output:
  • createPromise

    4 months ago

    Create a promise that resolves with the message 'Done' and log it.

  • usePromise

    4 months ago

    Use a promise to simulate loading user data and then log the result.

  • promiseFinally

    4 months ago

    Use .finally() to log 'Finished loading' after the promise is resolved.

  • chainPromises

    4 months ago

    Chain multiple .then() methods to transform a number from 2 to 7.

  • handleError

    4 months ago

    Catch an error if a promise is rejected and log the error message.

  • timeoutPromise

    4 months ago

    Wrap setTimeout in a promise to delay logging a message.

  • constructPromise

    4 months ago

    Construct a promise that rejects if the input is less than 5.

  • loadAllData

    4 months ago

    Use Promise.all to wait for two async operations.

  • fastestPromise

    4 months ago

    Use Promise.race to log the result of the fastest-resolving promise.

Mohammad Fallah

Crafting digital experiences with passion, precision, and a touch of magic

© 2025 CodeWithMMD. All right reserved.

Built with Nextjs