Tell us what’s happening:
asked to use a for loop to iterate through every element in the array except the last one and to use j as my inner loop’s iterator variable, i am not clear on how to go about it
Your code so far
const bubbleSort = (array) => {
for (let i = 0; i < array.length; i++) {
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
Challenge Information:
Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 15