Explain the .promise() method in jQuery.
The .promise() method in jQuery is used to return a promise that is resolved when all of the elements in the set have completed a specific action. For example, when all animations on the set of elements have completed. The returned promise object can be used to attach callbacks that will be executed when the promise is fulfilled or rejected.
