Difference Between Promise.resolve() & Promise.reject() methods in JavaScript Last Updated : 07 Feb, 2024 Improve Improve Like Article Like Save Share Report Promise.resolve() and Promise.reject() are both methods provided by the Promise object in JavaScript. They serve different purposes in handling asynchronous operations: Promise.resolve(): Creates a new Promise object that is resolved with the provided value or a resolved Promise object if the provided value is already a Promise. Example: const resolvedPromise = Promise.resolve('Resolved');resolvedPromise.then(console.log); // Output: Resolved Promise.reject(): Creates a new Promise object that is rejected with the provided reason. Useful for creating a rejected Promise object explicitly to signify failure or error conditions. Used when you want to handle error scenarios or explicitly reject a promise. Example: const rejectedPromise = Promise.reject('Rejected');rejectedPromise.catch(console.error); // Output: Rejected Like Article Suggest improvement Previous Implement polyfill for Promise.all() method in JavaScript Next How to Add Background Color in Input and Text Fields using CSS ? Share your thoughts in the comments Add Your Comment Please Login to comment...