Learn Basic Algorithm thinking By building a Number Sorter - step 28

Step 28

A selection sort relies on tracking the index of the smallest value in the array. Declare a variable minIndex and set it to i - this ensures that if your current value is the smallest, it will be swapped with itself and not be moved. You will need to be able to reassign the value of minIndex as you iterate through the array.
According to the console out put just to get the first one it says declare minIndex with i but it doesnt seem to remove it.
console:
// running tests You should use

let

to declare

minIndex

. You should set

minIndex

to

i

. You should have a nested

for

loop. Your

for

loop should initialize

j

to

i + 1

. Your

for

loop should iterate through the rest of the array. Your

for

loop should increment

j

. // tests completed

Learn Basic Algorithmic Thinking by Building a Number Sorter: Step 28 | freeCodeCamp.org

Would you share the code you have written for this lesson?

let minIndex = i this is what Im trying to solve inside the console then it goes on with the for loop.

Dont ask me why but the FCC editor works today. let minIndex is gone inside the console :sunglasses: