Bubble-sort-algorithm

Javascript Bubble sort algorithm. Swaps adjacent elements if they are in the wrong order. Time complexity O(n^2).