title: How to delete from javascript array an ajax when it is done
body: <p>How how do I delete a jQuery Deferred from an array when it finishes?  I have:</p>
  
  <pre><code>myarray[key]=$.ajax({
  
  }).done(function(response){
  
   // work with response,
   // then delete myarray[key];
  
  });
  </code></pre>
  
  <p>This does not work:</p>
  
  <pre><code>var myvar=function(){
    if(myvar){
      alert(1);
    }
  } 
  </code></pre>
  
  <p>Seems like the declaration has to finish for an event of checking whether the variable is set or not, so delete of the variable inside the variable declaration shouldn't work How to, with a timeout?</p>