I have the following function, which i suppose to print out the return value in HTML. The problem is that i get the error: Uncaught ReferenceError: retValue is not defined.
function f() {
              var request1 = $.ajax({
                   url : '/a',
                   type: "GET"
              });
              var request2 = $.ajax({
                  url: '/b', 
                  type: 'GET',
              });
              $.when(request1, request2).done(function(result1, result2){
              var retValue
              //do something
              return retValue
          }
    var rows = f();
    $("#status tbody").html(rows);
What could be the issue?
