File size: 335 Bytes
a225b7b
 
b17a946
 
 
a122d31
b17a946
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const https = require("https");

const urls = [
  "https://google.com",
  "https://github.com",
  "57.144.249.32",
  "https://web.whatsapp.com"
];

for (const url of urls) {
  https.get(url, (res) => {
    console.log(url, "=>", res.statusCode);
  }).on("error", (err) => {
    console.error(url, "=>", err.code, err.message);
  });
}