Merge pull request #2185 from vsemozhetbyt/patch-9

Make a solution of 1.5.5 task more correct
This commit is contained in:
Ilya Kantor 2020-10-11 17:17:16 +03:00 committed by GitHub
commit 8e613bc62c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
```js run no-beautify ```js run no-beautify
function sortByAge(arr) { function sortByAge(arr) {
arr.sort((a, b) => a.age > b.age ? 1 : -1); arr.sort((a, b) => a.age - b.age);
} }
let john = { name: "John", age: 25 }; let john = { name: "John", age: 25 };