Javascript, to proceed, have we must!
Insertion Sort Algorithm
Select the second item.
Place (insert) it at the proper position among all the items to its left.
Select the next item and repeat step 2.
Once you are done with the last item, the set will be in sorted order.
Completion time grows in quadratic proportion to the size of the array i.e. Order of Growth is $\mathcal{O}_{n^2}$.
Read more at Sedgewick, Robert and Wayne, Kevin.
"Elementary Sorts"
Algorithms, 4th Edition.