Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/timers.js: replace var with let/const #30404

Closed
wants to merge 1 commit into from
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
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
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
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
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