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); }); }