lib: replace var with let/const

PR-URL: https://github.com/nodejs/node/pull/30384
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
jens-cappelle authored and Michaël Zasso committed 2019-12-10 10:09:42 +01:00
1 parent 93ca4f4098
commit 0a34fcb086
1 file changed
+1 -1
+1 -1
View File
@@ -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