Different sorting algorithms writen with JavaScript and CoffeeScript