From 0a34fcb086cd3a33355537e5ae429f3cebde6056 Mon Sep 17 00:00:00 2001 From: jens-cappelle Date: Tue, 12 Nov 2019 16:03:30 +0100 Subject: [PATCH] lib: replace var with let/const PR-URL: https://github.com/nodejs/node/pull/30384 Reviewed-By: Gireesh Punathil Reviewed-By: Beth Griggs Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- lib/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/events.js b/lib/events.js index 203a20ed8057cd..d91fdfe6d04da9 100644 --- a/lib/events.js +++ b/lib/events.js @@ -311,7 +311,7 @@ EventEmitter.prototype.emit = function emit(type, ...args) { } else { const len = handler.length; const listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) { + for (let i = 0; i < len; ++i) { const result = ReflectApply(listeners[i], this, args); // We check if result is undefined first because that