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">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var http = require('http');
var urls = [process.argv[2], process.argv[3], process.argv[4]];
var holder = [];
var endCount = 0;
for(var i in urls){
    responseCount(i, urls[i])
}
//
function responseCount(count, url){
    http.get(url, function(res){
        res.setEncoding('utf8');
        var string = '';
        res.on('data', function(chunk){
            string += chunk;
        });
        res.on('end', function(){
            holder[count] = string;
            endCount ++;
            if(endCount >= 3) {
                for(var i in holder){
                    console.log(holder[i]);
                }
            }
        })
    }).on('error', console.error);
 }
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers