When chaining Promises in AJAX calls, what is the purpose of returning another Promise inside a .then() method?

  • To allow further chaining of asynchronous operations
  • To terminate the Promise chain
  • To handle synchronous operations within the Promise
  • To trigger a catch block if an error occurs in the Promise chain
In JavaScript, returning a Promise inside a .then() allows for continued chaining of asynchronous operations. This enables better organization and readability of asynchronous code.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *