mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-05 08:26:14 +08:00
Fix ESLint issues.
This commit is contained in:
@ -21,7 +21,13 @@ export default class InsertionSort extends Sort {
|
|||||||
this.callbacks.visitingCallback(array[currentIndex - 1]);
|
this.callbacks.visitingCallback(array[currentIndex - 1]);
|
||||||
|
|
||||||
// Swap the elements.
|
// Swap the elements.
|
||||||
[array[currentIndex - 1], array[currentIndex]] = [array[currentIndex], array[currentIndex - 1]];
|
[
|
||||||
|
array[currentIndex - 1],
|
||||||
|
array[currentIndex],
|
||||||
|
] = [
|
||||||
|
array[currentIndex],
|
||||||
|
array[currentIndex - 1],
|
||||||
|
];
|
||||||
|
|
||||||
// Shift current index left.
|
// Shift current index left.
|
||||||
currentIndex -= 1;
|
currentIndex -= 1;
|
||||||
|
Reference in New Issue
Block a user