From c50bbf58da67b5cd4650391b8bc4cf57ec888210 Mon Sep 17 00:00:00 2001 From: dnlup Date: Tue, 12 Nov 2019 17:06:53 +0100 Subject: [PATCH] readline: change var to let PR-URL: https://github.com/nodejs/node/pull/30435 Reviewed-By: Colin Ihrig Reviewed-By: David Carlier Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater Reviewed-By: Gireesh Punathil Reviewed-By: Denys Otrishko Reviewed-By: Michael Dawson --- lib/internal/readline/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/readline/utils.js b/lib/internal/readline/utils.js index 31de512f74ba85..b6957f6e8a1a61 100644 --- a/lib/internal/readline/utils.js +++ b/lib/internal/readline/utils.js @@ -16,7 +16,7 @@ let isFullWidthCodePoint; function CSI(strings, ...args) { let ret = `${kEscape}[`; - for (var n = 0; n < strings.length; n++) { + for (let n = 0; n < strings.length; n++) { ret += strings[n]; if (n < args.length) ret += args[n]; @@ -79,7 +79,7 @@ if (internalBinding('config').hasIntl) { str = stripVTControlCharacters(String(str)); - for (var i = 0; i < str.length; i++) { + for (let i = 0; i < str.length; i++) { const code = str.codePointAt(i); if (code >= kUTF16SurrogateThreshold) { // Surrogates.