Bubble sort, Merge sort and JavaScript native sort comparison