After graduating from university, I worked as an accountant in a bank for 4 years. In this direction, in such a short time, I achieved a certain growth and realized that I want to try myself in another area. At the moment, the IT sphere is a promising industry all over the world. Therefore, I would like to realize my potential in IT and contribute to the development of the Javascript community. —
function bubbleSort(array) {
for (let i = 0; i < array.length; i++) {
for (let j = 0; j < array.length - i - 1; j++) {
if (array[j + 1] < array[j]) {
[array[j + 1], array[j]] = [array[j], array[j + 1]];
}
}
}
return array;
}