Some Sort Algorithms in JavaScript