Title: docs: fixed misleading comment about the array method (forEach instead of reduce) used in AverageMean.js by HRIDYANSHU054 · Pull Request #1727 · TheAlgorithms/JavaScript · GitHub
Open Graph Title: docs: fixed misleading comment about the array method (forEach instead of reduce) used in AverageMean.js by HRIDYANSHU054 · Pull Request #1727 · TheAlgorithms/JavaScript
X Title: docs: fixed misleading comment about the array method (forEach instead of reduce) used in AverageMean.js by HRIDYANSHU054 · Pull Request #1727 · TheAlgorithms/JavaScript
Description: know more Describe your change: Documentation change? what was wrong? wrong array method in comment Before: // This loop sums all values in the 'nums' array using forEach loop const sum = nums.reduce((sum, cur) => sum + cur, 0) After: // This calculates the sum of all values in the 'nums' array using reduce method. const sum = nums.reduce((sum, cur) => sum + cur, 0) Checklist: I have read CONTRIBUTING.md. This pull request is all my own work -- I have not plagiarized. I know that pull requests will not be merged if they fail the automated tests. This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms. All new JavaScript files are placed inside an existing directory. All filenames should use the UpperCamelCase (PascalCase) style. There should be no spaces in filenames. Example:UserProfile.js is allowed but userprofile.js,Userprofile.js,user-Profile.js,userProfile.js are not All new algorithms have a URL in their comments that points to Wikipedia or another similar explanation. If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
Open Graph Description: know more Describe your change: Documentation change? what was wrong? wrong array method in comment Before: // This loop sums all values in the 'nums' array using forEach loop const sum...
X Description: know more Describe your change: Documentation change? what was wrong? wrong array method in comment Before: // This loop sums all values in the 'nums' array using forEach loop c...
Opengraph URL: https://github.com/TheAlgorithms/JavaScript/pull/1727
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c3c4cc26-35b7-fa28-2b0d-b4fda546e20b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9E30:2F50C0:8E413F:C6DEDA:6970B3F6 |
| html-safe-nonce | ee972f30d9557d825a7822939a98ca913b690167479385fc887eb951a53190f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTMwOjJGNTBDMDo4RTQxM0Y6QzZERURBOjY5NzBCM0Y2IiwidmlzaXRvcl9pZCI6IjY0Mjc0NTQ0NjYxNTk1ODgzNDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e1bca3400ca826d13d1e369218991e4d607e215d218108fdc1d3e30494322121 |
| hovercard-subject-tag | pull_request:2117652879 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/TheAlgorithms/JavaScript/pull/1727/files |
| twitter:image | https://avatars.githubusercontent.com/u/124202756?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/124202756?s=400&v=4 |
| og:image:alt | know more Describe your change: Documentation change? what was wrong? wrong array method in comment Before: // This loop sums all values in the 'nums' array using forEach loop const sum... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8e0be80373b724b033cdf8a7b1f78bf5fb6a5d7a2182a9a403aa30894606e390 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/TheAlgorithms/JavaScript git https://github.com/TheAlgorithms/JavaScript.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 97086543 |
| octolytics-dimension-repository_nwo | TheAlgorithms/JavaScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 97086543 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/JavaScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b8714db0002cf78dc2d2566571807e404d6cb817 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width