Skip to content

Commit 0266d7f

Browse files
rene.herrmanntargos
rene.herrmann
authored andcommitted
lib: change var to let/const
PR-URL: #30910 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 67a2a47 commit 0266d7f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/internal/console/constructor.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {
113113

114114
// Bind the prototype functions to this Console instance
115115
const keys = ObjectKeys(Console.prototype);
116-
for (var v = 0; v < keys.length; v++) {
117-
var k = keys[v];
116+
for (const key of keys) {
118117
// We have to bind the methods grabbed from the instance instead of from
119118
// the prototype so that users extending the Console can override them
120119
// from the prototype chain of the subclass.
121-
this[k] = this[k].bind(this);
120+
this[key] = this[key].bind(this);
122121
}
123122

124123
this[kBindStreamsEager](stdout, stderr);

0 commit comments

Comments
 (0)