title: Return result from asynchronous callback function
body: <p>I have seen lots of posts on stackoverflow regarding getting the returned value of an asynchronous call in a callback function but I would like to know if I could get the result without going much inside the callback.</p>
  
  <p>For Eg:
  <strong>Current Scenario</strong>:</p>
  
  <pre><code>myFunc(arg1,arg2, mycallback);
  ..
  function mycallback(values)
  {
  //Process values
  alert(values);
  }
  </code></pre>
  
  <p><strong>What I would like to have</strong>:</p>
  
  <pre><code>var returnedValues = myFunc(arg1,arg2, function mycallback(values)
  {
  return values;
  });
  
  // Now I would to use the returnedValues here...
  </code></pre>
  
  <p>Is the above scenario possible? Kindly let me know.</p>
  
  <p>Cheers.</p>