dfd.resolve difficulty

dfd.resolve difficulty

in the below example what is
  1. dfd.resolve('     and    ');
really doing ?

is it just passing values into :
  1.   function fn3( n ) {
  2.         $( "p" ).append( n + " 3 " + n );
  3.         }
is that all its doing ??

what practical usage would such a function really have .

found this example in the Jquery doc's itself .

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="utf-8">
  5.   <title>on demo</title>
  6.   <style>
  7.    
  8.   </style>
  9.   <script src="js/jquery.min.js"></script>
  10. </head>
  11. <body>
  12. <script>
  13. </script>
  14.  
  15. </body>
  16.     <button>Go</button>
  17.     <p>Ready...</p>
  18.     <script>
  19.         // 3 functions to call when the Deferred object is resolved
  20.         function fn1() {
  21.         $( "p" ).append( " 1 " );
  22.         }
  23.         function fn2() {
  24.         $( "p" ).append( " 2 " );
  25.         }
  26.         function fn3( n ) {
  27.         $( "p" ).append( n + " 3 " + n );
  28.         }
  29.       
  30.         // Resolve the Deferred object when the button is clicked
  31.         $( "button" ).on( "click", function() {
  32.        
  33.          // Create a deferred object
  34.         var dfd = $.Deferred();
  35.         dfd.resolve('     and    ');
  36.         // Add handlers to be called when dfd is resolved
  37.         dfd
  38.         // .done() can take any number of functions or arrays of functions
  39.         .done( [ fn1, fn2 ], fn3, [ fn2, fn1 ] )
  40.         // We can chain done methods, too
  41.         .done(function( n ) {
  42.         $( "p" ).append( n + " we're done." );
  43.         });
  44.         });
  45.     </script>
  46. </html>