jQuery supports a feature called promises. The idea being that you have have a number of actions pending like multiple API calls and get an action implemented when they are all done. Personally I think this is an example of letting edge cases complicate a core simple design. I have never written code that has required the promises feature of jQuery. I find the concept confusing and I think it adds to the complexity of the code.
When my team was porting our code away from using jQuery to using the new code to call apis the question came up about what to do with the code that was using promises for chaining several API calls. Looking at the code together it became obvious that each usage was typically signaling an underlying design problem with the code. For example
...