Adding quicksort in javascript.