Skip to content

correct func parameter in solution #3555

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sammeeey
Copy link

The task was to create a function sortByAge(users) (using users as parameter). Now also the solution reflects that.

The task was to create a function `sortByAge(users)` (using `users` as parameter). Now also the solution reflects that.
Copy link
Member

@Alexandre887 Alexandre887 left a comment

Choose a reason for hiding this comment

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

I'd also suggest to rename arr to users here:

image

@@ -1,5 +1,5 @@
```js run no-beautify
function sortByAge(arr) {
function sortByAge(users) {
arr.sort((a, b) => a.age - b.age);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
arr.sort((a, b) => a.age - b.age);
users.sort((a, b) => a.age - b.age);

@smith558 smith558 self-assigned this Feb 14, 2024
@smith558 smith558 added the P1 High priority label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants