building sorting in javascript
quick sort and insertion sort built