Skip to content

Commit 0599d07

Browse files
authored
Merge pull request #2177 from vsemozhetbyt/patch-3
Make code example more realistic and safe
2 parents b6f3f5c + f880f1f commit 0599d07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

1-js/05-data-types/05-array-methods/article.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ By the way, if we ever want to know which elements are compared -- nothing preve
426426
```js run
427427
[1, -2, 15, 2, 0, 8].sort(function(a, b) {
428428
alert( a + " <> " + b );
429+
return a - b;
429430
});
430431
```
431432

0 commit comments

Comments
 (0)