transform-when is a library I wrote at SamKnows that allows you to combine a number of variables—scroll position, time, and user actions—to create beautiful, performant animations. This article demonstrates some of the functionality of the library.
If you or a computer needs to sort a list of items, you'll use an algorithm to do it. There are lots of different sorting algorithms: this article explains and visualises some of the common ones.
This article explains how you can represent an array as an HTML list, make it sortable, and make changes to the HTML list be reflected in the original array.