Skip to content

Commit 35bd7a7

Browse files
committed
Updated to declare 'i' and 'j' as variables so they're not attached to the global scope.
Kind of nit-picky, I know, but it's standing out to me like a trailing comma or missing closing brace.
1 parent 3ac227d commit 35bd7a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

algorithms/sorting/selection-sort/selection-sort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function swap(items, firstIndex, secondIndex){
4444
function selectionSort(items){
4545

4646
var len = items.length,
47-
min;
47+
min, i, j;
4848

4949
for (i=0; i < len; i++){
5050

0 commit comments

Comments
 (0)