Bubble Sort Algorithm

Easy
5
20.6% Acceptance

In this lab, your task is to implement the bubble sort algorithm in JavaScript. Given an array of integers, your function should sort the array in ascending order using the bubble sort algorithm.

The bubble sort algorithm compares each pair of adjacent elements and swaps them if they're in the wrong order. This process repeats until the entire array is sorted.

Note: You should not use any built-in JavaScript sorting functions like Array.prototype.sort.