Can the use of "continue" impact performance? How does it affect the bubble sorting function specifically? Is there a scenario where its usage could improve performance?
function bubbleSort(array) {
for (let i = 0; i < array.length; i++) {
for (let j = 0; j < array.length - i; j++) {
if (array[j] > array[j + 1]) {
[array[j], array[j + 1]] = [array[j + 1], array[j]];
} else {
continue;
}
console.log(array);
}
}
return array;
}