diff --git a/lib/tls.js b/lib/tls.js index 2ac43c01d32..5372aadccd6 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -109,8 +109,8 @@ function convertProtocols(protocols) { return p + 1 + len; }, 0)); - var offset = 0; - for (var i = 0, c = protocols.length; i < c; i++) { + let offset = 0; + for (let i = 0, c = protocols.length; i < c; i++) { buff[offset++] = lens[i]; buff.write(protocols[i], offset); offset += lens[i]; @@ -163,7 +163,7 @@ function check(hostParts, pattern, wildcards) { return false; // Check host parts from right to left first. - for (var i = hostParts.length - 1; i > 0; i -= 1) { + for (let i = hostParts.length - 1; i > 0; i -= 1) { if (hostParts[i] !== patternParts[i]) return false; }