return new Promise((resolve, reject) => {
      });
      Javascript language logo

      Create promise

      My JavaScript recipes

      The code returns a new Promise object. The Promise object has two methods: resolve, which returns a boolean indicating whether the promise was successfully resolved, and reject, which returns a boolean indicating whether the promise was rejected.

      Shortcut: promise.simple

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.