diff --git a/lib/internal/crypto/util.js b/lib/internal/crypto/util.js index 9492409e3a6437..854994277e5d30 100644 --- a/lib/internal/crypto/util.js +++ b/lib/internal/crypto/util.js @@ -71,7 +71,7 @@ function lazyRequire(name) { return ret; } -var defaultEncoding = 'buffer'; +let defaultEncoding = 'buffer'; function setDefaultEncoding(val) { defaultEncoding = val; diff --git a/lib/internal/dns/promises.js b/lib/internal/dns/promises.js index 314b121be5d152..68fcb29745e92d 100644 --- a/lib/internal/dns/promises.js +++ b/lib/internal/dns/promises.js @@ -67,7 +67,7 @@ function onlookupall(err, addresses) { const family = this.family; - for (var i = 0; i < addresses.length; i++) { + for (let i = 0; i < addresses.length; i++) { const address = addresses[i]; addresses[i] = { @@ -121,10 +121,10 @@ function createLookupPromise(family, hostname, all, hints, verbatim) { } function lookup(hostname, options) { - var hints = 0; - var family = -1; - var all = false; - var verbatim = getDefaultVerbatim(); + let hints = 0; + let family = -1; + let all = false; + let verbatim = getDefaultVerbatim(); // Parse arguments if (hostname) { @@ -297,7 +297,7 @@ Resolver.prototype.resolveNaptr = resolveMap.NAPTR = resolver('queryNaptr'); Resolver.prototype.resolveSoa = resolveMap.SOA = resolver('querySoa'); Resolver.prototype.reverse = resolver('getHostByAddr'); Resolver.prototype.resolve = function resolve(hostname, rrtype) { - var resolver; + let resolver; if (rrtype !== undefined) { validateString(rrtype, 'rrtype'); diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index 38578d2a151c52..962bdd753c2717 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -588,7 +588,7 @@ const assertWithinRange = hideStackFrames( function toHeaderObject(headers, sensitiveHeaders) { const obj = ObjectCreate(null); - for (var n = 0; n < headers.length; n += 2) { + for (let n = 0; n < headers.length; n += 2) { const name = headers[n]; let value = headers[n + 1]; if (name === HTTP2_HEADER_STATUS)