Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 22

Tell us what’s happening:

I am struggling to find the issue with this code. Anyone have any ideas

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

       if (array[j] > array[j + 1]) {
        let temp = array[j];
        array[j] = array[j + 1];
        array[j + 1] = temp;
      }

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0

Challenge Information:

Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 22

They just wanted a const variable.

Thank you! I must have missed that somewhere.

They don’t explicitly say it but you can assume they always want const unless they explicitly say otherwise.

I have had the same problem, i think the word “variable” is equal to “let” and the word “constant” is equal to “const”. They should fix that.

In all cases in the fCC curriculum, use const unless explicitly requested not to.