Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib/timers.js: replace var with let/const
  • Loading branch information
Tembrechts authored and Tembrechts committed Nov 12, 2019
commit 539bd30fe40d543c3732dedaffa7b85236cc6384
6 changes: 3 additions & 3 deletions lib/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function setTimeout(callback, after, arg1, arg2, arg3) {
throw new ERR_INVALID_CALLBACK(callback);
}

var i, args;
let i, args;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move i to line 135?

for (let i = 5; i < arguments.length; i++) {

switch (arguments.length) {
// fast cases
case 1:
Expand Down Expand Up @@ -164,7 +164,7 @@ function setInterval(callback, repeat, arg1, arg2, arg3) {
throw new ERR_INVALID_CALLBACK(callback);
}

var i, args;
let i, args;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move i to line 181?

for (let i = 5; i < arguments.length; i++) {

switch (arguments.length) {
// fast cases
case 1:
Expand Down Expand Up @@ -248,7 +248,7 @@ function setImmediate(callback, arg1, arg2, arg3) {
throw new ERR_INVALID_CALLBACK(callback);
}

var i, args;
let i, args;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move i to line 264?

for (let i = 4; i < arguments.length; i++) {

switch (arguments.length) {
// fast cases
case 1:
Expand Down