diff --git a/benchmark/http/bench-parser.js b/benchmark/http/bench-parser.js index 05776f2d8a3500..e514ce7e754cba 100644 --- a/benchmark/http/bench-parser.js +++ b/benchmark/http/bench-parser.js @@ -22,7 +22,7 @@ function main({ len, n }) { const parser = newParser(REQUEST); bench.start(); - for (var i = 0; i < n; i++) { + for (let i = 0; i < n; i++) { parser.execute(header, 0, header.length); parser.initialize(REQUEST, {}); } @@ -45,7 +45,7 @@ function main({ len, n }) { let header = `GET /hello HTTP/1.1${CRLF}Content-Type: text/plain${CRLF}`; - for (var i = 0; i < len; i++) { + for (let i = 0; i < len; i++) { header += `X-Filler${i}: ${Math.random().toString(36).substr(2)}${CRLF}`; } header += CRLF; diff --git a/benchmark/http/check_invalid_header_char.js b/benchmark/http/check_invalid_header_char.js index 46ca9f3d7338f6..245dc6fb8e1e7f 100644 --- a/benchmark/http/check_invalid_header_char.js +++ b/benchmark/http/check_invalid_header_char.js @@ -61,7 +61,7 @@ function main({ n, input }) { const len = inputs.length; bench.start(); - for (var i = 0; i < n; i++) { + for (let i = 0; i < n; i++) { _checkInvalidHeaderChar(inputs[i % len]); } bench.end(n); diff --git a/benchmark/http/check_is_http_token.js b/benchmark/http/check_is_http_token.js index eab075249e6f80..2137a73e547d60 100644 --- a/benchmark/http/check_is_http_token.js +++ b/benchmark/http/check_is_http_token.js @@ -42,7 +42,7 @@ const bench = common.createBenchmark(main, { function main({ n, key }) { bench.start(); - for (var i = 0; i < n; i++) { + for (let i = 0; i < n; i++) { _checkIsHttpToken(key); } bench.end(n); diff --git a/benchmark/http/set_header.js b/benchmark/http/set_header.js index 4129e4fee0cee7..470d4b008187bc 100644 --- a/benchmark/http/set_header.js +++ b/benchmark/http/set_header.js @@ -23,7 +23,7 @@ function main(conf) { const og = new OutgoingMessage(); bench.start(); - for (var i = 0; i < n; i++) { + for (let i = 0; i < n; i++) { og.setHeader(value, ''); } bench.end(n);