Node.js dns 模块 ES6 遍历Set ES6 遍历Set Node.js dns 模块 var dns = require('dns'); dns.lookup('www.google.com', function onLookup(err, address, family) { console.log('address:', address); dns.reverse(address, function (err, hostnames) { if (err) { console.log(err.stack); } console.log('reverse for ' + address + ': ' + JSON.stringify(hostnames)); }); }); ES6 遍历Set ES6 遍历Set