# Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 15

### Tell us what’s happening:

Hi there,
I am currently attempting to create a nested for loop to iterate through every element of the array except the last one.

I have looked up other posts regarding this challenge and other users have been able to pass this step by declaring their ‘j’ variable as ‘j = i + 1’.

This is not an option for me as the code will no longer pass unless ‘j’ is assigned the value of 0.

Is my current condition not fulfilling the task?

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

``````const bubbleSort = (array) => {
for (let i = 0; i < array.length; i++) {
for (let j = 0; j < array[i].length - 1; j++) {

}
}
}
``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`

### Challenge Information:

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

Explain in words what this is doing.