Skip to content

Commit

Permalink
lib: change var to let/const
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rene.herrmann authored and BethGriggs committed Feb 6, 2020
1 parent ada7624 commit d19316d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/internal/console/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {

// Bind the prototype functions to this Console instance
const keys = ObjectKeys(Console.prototype);
for (var v = 0; v < keys.length; v++) {
var k = keys[v];
for (const key of keys) {
// We have to bind the methods grabbed from the instance instead of from
// the prototype so that users extending the Console can override them
// from the prototype chain of the subclass.
this[k] = this[k].bind(this);
this[key] = this[key].bind(this);
}

this[kBindStreamsEager](stdout, stderr);
Expand Down

0 comments on commit d19316d

Please sign in to comment.