collapseToEnd

The Selection.collapseToEnd() method collapses the selection to the end of the last range in the selection.

MDN Reference