mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-09-20 07:43:04 +08:00
Fix ESLint issues.
This commit is contained in:
parent
2ffb7b7abf
commit
f42433e51e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user