Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
function f() {
    setTimeout(function a() {console.log(10);}, 3);
    
    // noprotect
    var now = Date.now();
    while(Date.now() - now < 1000);
  
    setTimeout(function b() {console.log(20);}, 2);
    setTimeout(function c() {console.log(30);}, 1);
    setTimeout(function d() {console.log(40);}, 0);
}
f();
Output

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

Dismiss x
public
Bin info
jakearchibaldpro
0viewers