Yahoo India Web Search

Search results

  1. Here is how to use a Promise: myPromise.then(. function(value) { /* code if successful */ }, function(error) { /* code if some error */ } ); Promise.then () takes two arguments, a callback for success and another for failure. Both are optional, so you can add a callback for success or failure only.

  2. May 31, 2024 · Learn how to use JavaScript Promises to simplify managing multiple asynchronous operations. See syntax, parameters, methods, examples and supported browsers of Promise.

    • 22 min
  3. Jun 9, 2024 · A Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason.

  4. Learn how to use promises to handle asynchronous operations in JavaScript. See examples of creating, chaining, and using methods such as then(), catch(), and finally() with promises.

  5. Learn the meaning of promise as a verb and a noun, with synonyms, antonyms, and idioms. See how to use promise in sentences from the Cambridge English Corpus.

  6. Dec 16, 2013 · Learn how to use promises to simplify asynchronous programming in JavaScript. This article explains the basics of promises, their terminology, browser support, and how to use them with XMLHttpRequest and other libraries.

  7. May 31, 2024 · A promise is an object returned by an asynchronous function, which represents the current state of the operation. At the time the promise is returned to the caller, the operation often isn't finished, but the promise object provides methods to handle the eventual success or failure of the operation.

  1. People also search for