Skip to content

Commit 5942846

Browse files
author
mik-laj
committed
Fix small typo
1 parent 704669a commit 5942846

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/sorting/quicksort-functional.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @param {array} array Array which should be processed
2323
*/
2424
return function quickSort(array, cmp) {
25-
if (arr.length < 1) {
25+
if (array.length < 1) {
2626
return arr;
2727
}
2828

@@ -33,7 +33,6 @@
3333
x,
3434
...quickSort(rest.filter(v => cmp(v, x) >= 0))
3535
]
36-
return array;
3736
}
3837

3938

@@ -58,7 +57,7 @@
5857
*/
5958
return function (array, cmp) {
6059
cmp = cmp || compare;
61-
quicksort(array, 0, array.length - 1, cmp);
60+
quickSort(array, 0, array.length - 1, cmp);
6261
return array;
6362
};
6463

0 commit comments

Comments
 (0)