A JavaScript implementation of the quick sort algorithm