FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

replace forEach with for loop by Ram1607 · Pull Request #49794 · nodejs/node · GitHub

/ node Public

replace forEach with for loop - #49794

Closed
Ram1607 wants to merge 4 commits into
nodejs:mainfrom
Ram1607:main
Closed

replace forEach with for loop#49794
Ram1607 wants to merge 4 commits into
nodejs:mainfrom
Ram1607:main

Conversation

Ram1607 commented Sep 22, 2023

Copy link
Copy Markdown
Contributor

Changes will replace forEach loop to for loop

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 22, 2023
tniessen added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Sep 22, 2023

tniessen left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please use for ... of instead of a traditional index-based for loop.

Trott commented Sep 22, 2023

Copy link
Copy Markdown
Member

What is the reason for this change? I see the code-and-learn label so I guess it is from...Grace Hopper Day or something?

Copy link
Copy Markdown
Member

@Trott Yes, most occurrences of forEach predate support for for ... of. The latter allows const variables and works with non-arrays.

Ram1607 changed the title Replace forEach with for loop replace forEach with for loop Sep 22, 2023
lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 2, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 2, 2023

Copy link
Copy Markdown
Collaborator

lpinca pushed a commit that referenced this pull request Nov 2, 2023
Replace `forEach()` with `for...of` in in test-dgram-socket-buffer-size.

PR-URL: #49794
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

lpinca commented Nov 2, 2023

Copy link
Copy Markdown
Member

Landed in 196224c.

lpinca closed this Nov 2, 2023
targos pushed a commit that referenced this pull request Nov 11, 2023
Replace `forEach()` with `for...of` in in test-dgram-socket-buffer-size.

PR-URL: #49794
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Nov 14, 2023
Replace `forEach()` with `for...of` in in test-dgram-socket-buffer-size.

PR-URL: #49794
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
Replace `forEach()` with `for...of` in in test-dgram-socket-buffer-size.

PR-URL: #49794
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon mentioned this pull request Dec 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL