Skip to content

Commit cbe29ce

Browse files
rene.herrmannMylesBorins
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 7a25c2c commit cbe29ce

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
@@ -115,12 +115,11 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {
115115

116116
// Bind the prototype functions to this Console instance
117117
const keys = ObjectKeys(Console.prototype);
118-
for (var v = 0; v < keys.length; v++) {
119-
var k = keys[v];
118+
for (const key of keys) {
120119
// We have to bind the methods grabbed from the instance instead of from
121120
// the prototype so that users extending the Console can override them
122121
// from the prototype chain of the subclass.
123-
this[k] = this[k].bind(this);
122+
this[key] = this[key].bind(this);
124123
}
125124

126125
this[kBindStreamsEager](stdout, stderr);

0 commit comments

Comments
 (0)