bubblesort in javascript