We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2901e0c commit ad50be1Copy full SHA for ad50be1
1 file changed
1-js/05-data-types/05-array-methods/article.md
@@ -389,6 +389,7 @@ Literally, all elements are converted to strings for comparisons. For strings, l
389
To use our own sorting order, we need to supply a function as the argument of `arr.sort()`.
390
391
The function should compare two arbitrary values and return:
392
+
393
```js
394
function compare(a, b) {
395
if (a > b) return 1; // if the first value is greater than the second
0 commit comments