title: jQuery ajax success anonymous function scope
body: <p>How do I update the returnHtml variable from within the anonymous success function?</p>
  
  <pre><code>function getPrice(productId, storeId) {
      var returnHtml = '';
  
      jQuery.ajax({
          url: "/includes/unit.jsp?" + params,
          cache: false,
          dataType: "html",
          success: function(html){
              returnHtml = html;
          }
      });
  
      return returnHtml;
  }
  </code></pre>