title: How to get returned a value by a callback function
body: <p>Here is my code </p>
  
  <pre><code>function save_current_side(current_side) {
      var result;
      var final = a.b({
          callback: function (a) {
              console.log(a); // its working fine here 
              return a;
          }
      });
  }
  </code></pre>
  
  <p>where b is the synchronous function.
  I am calling the above function anywhere in the code</p>
  
  <pre><code>var saved =  save_current_side(current_side);
  </code></pre>
  
  <p>The variable saved is undefined. How to get returned valued by callback function</p>