Skip to content

Commit f39a999

Browse files
author
Christian Bender
authored
Merge pull request TheAlgorithms#55 from christianbender/changed_gnomeSort
added the let-statment
2 parents 370361a + 1c835b4 commit f39a999

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sorts/gnomeSort.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ function gnomeSort(items) {
1010
return;
1111
}
1212

13-
var i = 1;
13+
let i = 1;
1414

1515
while (i < items.length) {
1616

1717
if (items[i - 1] <= items[i]) {
1818
i++;
1919
} else {
20-
var temp = items[i];
20+
let temp = items[i];
2121
items[i] = items[i - 1];
2222
items[i - 1] = temp;
2323

0 commit comments

Comments
 (0)