Skip to content

Commit 93f0206

Browse files
author
rene.herrmann
committed
lib: change var to let/const
1 parent 76cbb66 commit 93f0206

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)