Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
</body>
</html>
 
var g=[];
var d=$.Deferred();
g.push(d);
var d=$.Deferred();
g.push(d);
$.when.apply($,g).done(function (sum){console.log(sum)});
                   
setTimeout(function (){g[0].resolve(1);},1000);
setTimeout(function (){g[1].resolve(2);},2000);
                       
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers