diff options
author | rene.herrmann <rene.herrmann@share-now.com> | 2019-12-12 10:12:22 +0100 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2020-02-06 02:49:29 +0000 |
commit | d19316d2d943f26b5574bd2edf7961545eae5ebe (patch) | |
tree | bb5ecb149618f97368e0d88b9bba102b0af77fac | |
parent | ada7624e6b0df98592fa0e7095080ac78513b484 (diff) | |
download | node-new-d19316d2d943f26b5574bd2edf7961545eae5ebe.tar.gz |
lib: change var to let/const
PR-URL: https://github.com/nodejs/node/pull/30910
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
-rw-r--r-- | lib/internal/console/constructor.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index c8ae659358..81c8939e90 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -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); |