This is an example of insertionsort, check the page source.

See the output in the browser console