0

I wonder what is better, nested or chained promises, or it depends on the context? What are the cons and pros of each.

if I use chained promises, how do I reuse variable that were set in the previous promise?

Thanks!

Andy
  • 1
  • 1
  • Possible duplicate of [How do I access previous promise results in a .then() chain?](http://stackoverflow.com/questions/28250680/how-do-i-access-previous-promise-results-in-a-then-chain) – Abhyudit Jain Nov 15 '16 at 07:24
  • See [How to chain and share prior results with promises](http://stackoverflow.com/questions/28714298/how-to-chain-and-share-prior-results-with-promises/28714863#28714863) – jfriend00 Nov 15 '16 at 07:46
  • okay but what is better? – Andy Nov 15 '16 at 09:49

0 Answers0