diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index acc566e37bb4bf..f0abddcc3a695c 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -112,15 +112,15 @@ for (const name of Reflect.ownKeys(Dirent.prototype)) { } function copyObject(source) { - var target = {}; - for (var key in source) + const target = {}; + for (const key in source) target[key] = source[key]; return target; } function getDirents(path, [names, types], callback) { - var i; - if (typeof callback == 'function') { + let i; + if (typeof callback === 'function') { const len = names.length; let toFinish = 0; for (i = 0; i < len; i++) {